Skip to content

Commit e48eca4

Browse files
committed
Add a GitHub action to update to the last version of GitHub pages ruby package
1 parent 823785a commit e48eca4

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Update GitHub pages ruby packages
2+
3+
on: workflow_dispatch
4+
5+
jobs:
6+
update-gh-pages-package:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v3
11+
- name: Remove lock file
12+
run: rm ./Gemfile.lock
13+
- uses: ruby/setup-ruby@v1
14+
with:
15+
ruby-version: '3.0' # Not needed with a .ruby-version file
16+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
17+
- name: Bundle install
18+
run: bundle install
19+
- name: Commit
20+
run: |
21+
git config --local user.email `git show -s --format='%ae'`
22+
git config --local user.name ${GITHUB_ACTOR}
23+
git remote add github "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git"
24+
git add ./Gemfile.lock
25+
git commit -m "Update GitHub pages ruby packages"
26+
git push github HEAD:${GITHUB_REF}

0 commit comments

Comments
 (0)