Skip to content

Commit b8079bf

Browse files
committed
fix(ci): build by updating ruby version
1 parent 674e164 commit b8079bf

File tree

3 files changed

+30
-17
lines changed

3 files changed

+30
-17
lines changed

.github/workflows/gh-pages.yml

+28-16
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,47 @@ on:
44
push:
55
branches:
66
- main
7+
pull_request:
8+
branches:
9+
- main
710

811
jobs:
9-
deploy:
10-
runs-on: ubuntu-18.04
12+
build:
13+
runs-on: ubuntu-latest
14+
if: github.ref != 'refs/heads/main'
1115
steps:
1216
- uses: actions/checkout@v2
1317

14-
- name: Set up Ruby 2.6
15-
uses: actions/setup-ruby@v1
18+
- name: Set up Ruby
19+
uses: ruby/setup-ruby@v1
1620
with:
17-
ruby-version: 2.6.x
21+
ruby-version: 3.1
22+
bundler-cache: true
23+
24+
- name: Build the site
25+
env:
26+
JEKYLL_ENV: production
27+
run: |
28+
./bin/data-update
29+
bundle exec jekyll build
30+
31+
deploy:
32+
runs-on: ubuntu-latest
33+
if: github.ref == 'refs/heads/main'
34+
steps:
35+
- uses: actions/checkout@v2
1836

19-
- name: Cache gems
20-
uses: actions/cache@preview
37+
- name: Set up Ruby
38+
uses: ruby/setup-ruby@v1
2139
with:
22-
path: vendor/bundle
23-
key: ${{ runner.os }}-gem-${{ hashFiles('Gemfile.lock') }}
24-
restore-keys: |
25-
${{ runner.os }}-gem-
40+
ruby-version: 3.1
41+
bundler-cache: true
2642

2743
- name: Build the site
2844
env:
2945
JEKYLL_ENV: production
3046
run: |
31-
gem install bundler -v '~> 2.0'
32-
bundle config path vendor/bundle
33-
make update
34-
bundle config --global frozen 1
35-
bundle install --jobs 4 --retry 3
47+
./bin/data-update
3648
bundle exec jekyll build
3749
3850
- name: deploy

.mergify.yml

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ queue_rules:
22
- name: dependabot
33
conditions:
44
- author=dependabot[bot]
5+
- status-success=build
6+
- base=main
57

68
pull_request_rules:
79
- name: automatic merge for Dependabot pull requests

Makefile

-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,3 @@ update:
2020

2121
serve: setup
2222
bundle exec jekyll s --drafts --trace
23-

0 commit comments

Comments
 (0)