Skip to content

Commit e155430

Browse files
authored
Update jekyll.yml
Update jekyll.yml by gpt suggest
1 parent 094ba1b commit e155430

File tree

1 file changed

+8
-20
lines changed

1 file changed

+8
-20
lines changed

.github/workflows/jekyll.yml

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,45 @@
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.
5-
6-
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
71
name: Deploy Jekyll site to Pages
82

93
on:
10-
# Runs on pushes targeting the default branch
114
push:
125
branches: ["main"]
13-
14-
# Allows you to run this workflow manually from the Actions tab
156
workflow_dispatch:
167

17-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
188
permissions:
199
contents: read
2010
pages: write
2111
id-token: write
2212

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.
2513
concurrency:
2614
group: "pages"
2715
cancel-in-progress: false
2816

2917
jobs:
30-
# Build job
3118
build:
3219
runs-on: ubuntu-latest
3320
steps:
3421
- name: Checkout
3522
uses: actions/checkout@v3
23+
3624
- name: Setup Ruby
37-
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
25+
uses: ruby/setup-ruby@v1 # 使用版本标记
3826
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
27+
ruby-version: '3.1'
28+
bundler-cache: true
29+
cache-version: 1 # 增加缓存版本号以强制更新缓存
30+
4231
- name: Setup Pages
4332
id: pages
4433
uses: actions/configure-pages@v3
34+
4535
- name: Build with Jekyll
46-
# Outputs to the './_site' directory by default
4736
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
4837
env:
4938
JEKYLL_ENV: production
39+
5040
- name: Upload artifact
51-
# Automatically uploads an artifact from the './_site' directory by default
5241
uses: actions/upload-pages-artifact@v2
5342

54-
# Deployment job
5543
deploy:
5644
environment:
5745
name: github-pages

0 commit comments

Comments
 (0)