Skip to content

Commit f9c9410

Browse files
authored
Update jekyll.yml
1 parent abf4b3e commit f9c9410

File tree

1 file changed

+13
-19
lines changed

1 file changed

+13
-19
lines changed

.github/workflows/jekyll.yml

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,51 @@
1-
# This workflow uses actions that are not certified by GitHub.
2-
# They are provided by a third-party and are governed by
3-
# separate terms of service, privacy policy, and support
4-
# documentation.
51

62
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
73
name: Deploy Jekyll site to Pages
84

95
on:
10-
# Runs on pushes targeting the default branch
116
push:
127
branches: ["main"]
13-
14-
# Allows you to run this workflow manually from the Actions tab
158
workflow_dispatch:
169

17-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1810
permissions:
1911
contents: read
2012
pages: write
2113
id-token: write
2214

23-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
24-
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
2515
concurrency:
2616
group: "pages"
2717
cancel-in-progress: false
2818

2919
jobs:
30-
# Build job
3120
build:
32-
runs-on: ubuntu-22.04
21+
runs-on: ubuntu-latest
3322
steps:
3423
- name: Checkout
3524
uses: actions/checkout@v4
25+
3626
- name: Setup Ruby
37-
uses: ruby/setup-ruby@8575951200e472d5f2d95c625da0c7bec8217c42 # v1.161.0
27+
uses: ruby/setup-ruby@v1
3828
with:
39-
ruby-version: '3.1' # Not needed with a .ruby-version file
40-
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
41-
cache-version: 0 # Increment this number if you need to re-download cached gems
29+
ruby-version: '3.2'
30+
bundler-cache: false # 禁用缓存
31+
4232
- name: Setup Pages
4333
id: pages
4434
uses: actions/configure-pages@v5
35+
36+
- name: Install dependencies
37+
run: |
38+
gem install bundler
39+
bundle install
40+
4541
- name: Build with Jekyll
46-
# Outputs to the './_site' directory by default
4742
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
4843
env:
4944
JEKYLL_ENV: production
45+
5046
- name: Upload artifact
51-
# Automatically uploads an artifact from the './_site' directory by default
5247
uses: actions/upload-pages-artifact@v3
5348

54-
# Deployment job
5549
deploy:
5650
environment:
5751
name: github-pages

0 commit comments

Comments
 (0)