Skip to content

Commit 3af9fcf

Browse files
committed
ci: update actions workflow
1 parent 346e27b commit 3af9fcf

File tree

1 file changed

+14
-17
lines changed

1 file changed

+14
-17
lines changed

.github/workflows/gh-pages.yml

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,13 @@ on:
1111
jobs:
1212
build:
1313
runs-on: ubuntu-latest
14-
if: github.ref != 'refs/heads/main'
1514
steps:
16-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v4
1716

1817
- name: Set up Ruby
1918
uses: ruby/setup-ruby@v1
2019
with:
21-
ruby-version: 3.2
20+
ruby-version: 3.4
2221
bundler-cache: true
2322

2423
- name: Build the site
@@ -28,26 +27,24 @@ jobs:
2827
./bin/data-update
2928
bundle exec jekyll build
3029
30+
- name: Upload artifact
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: _site
34+
path: _site
35+
3136
deploy:
3237
runs-on: ubuntu-latest
38+
needs: build
3339
if: github.ref == 'refs/heads/main'
3440
steps:
35-
- uses: actions/checkout@v2
36-
37-
- name: Set up Ruby
38-
uses: ruby/setup-ruby@v1
41+
- name: Download artifact
42+
uses: actions/download-artifact@v4
3943
with:
40-
ruby-version: 3.2
41-
bundler-cache: true
42-
43-
- name: Build the site
44-
env:
45-
JEKYLL_ENV: production
46-
run: |
47-
./bin/data-update
48-
bundle exec jekyll build
44+
name: _site
45+
path: _site
4946

50-
- name: deploy
47+
- name: Deploy to GitHub Pages
5148
uses: peaceiris/actions-gh-pages@v3
5249
with:
5350
github_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)