Update the ruby setup in gh-actions

This commit is contained in:
Cotes Chung 2021-04-01 04:09:47 +08:00
parent dff8e09089
commit 1d7d7cffac
3 changed files with 5 additions and 19 deletions

View File

@ -13,9 +13,6 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env:
GEMS_PATH: ~/vendor/bundle
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
@ -23,22 +20,10 @@ jobs:
fetch-depth: 0 # for posts's lastmod fetch-depth: 0 # for posts's lastmod
- name: Setup Ruby - name: Setup Ruby
uses: actions/setup-ruby@v1 uses: ruby/setup-ruby@v1
with: with:
ruby-version: 2.7 ruby-version: 2.7
bundler-cache: true
- name: Bundle Caching
uses: actions/cache@v2
with:
path: ${{ env.GEMS_PATH }}
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Bundle Install
run: |
bundle config path ${{ env.GEMS_PATH }}
bundle install --jobs 4 --retry 3
- name: Check baseurl - name: Check baseurl
run: | run: |

3
.gitignore vendored
View File

@ -2,9 +2,10 @@
.* .*
!.github !.github
# jekyll cache # bundler cache
_site _site
vendor vendor
Gemfile.lock
# rubygem # rubygem
*.gem *.gem

View File

@ -60,7 +60,7 @@ $tab-count: {{ site.tabs | size | plus: 1 }};
### Publishing to GitHub Pages ### Publishing to GitHub Pages
See the `jekyll-theme-chirpy`'s [deployment instructions](https://github.com/cotes2020/jekyll-theme-chirpy#deployment). Note that in order to use GitHub Actions caching to speed up the deployment, you should add the `Gemfile.lock` file to your repository. See the [deployment instructions](https://github.com/cotes2020/jekyll-theme-chirpy#deployment) of `jekyll-theme-chirpy`.
### Updating ### Updating