Skip to content

Commit

Permalink
Update jekyll_deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Routhleck committed Aug 27, 2023
1 parent 14624cf commit fcb562f
Showing 1 changed file with 25 additions and 31 deletions.
56 changes: 25 additions & 31 deletions .github/workflows/jekyll_deploy.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,36 @@
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: Deploy Jekyll with GitHub Pages dependencies preinstalled
name: Build and Deploy Jekyll to GitHub Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["web-deployment"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
branches:
- web-deployment # 更改为您的主分支名称,如果不是 master

jobs:
# Build job
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./
destination: ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.5 # 使用与您的 Jekyll 网站相匹配的 Ruby 版本

- name: Install dependencies
run: |
gem install bundler:1.17.1
bundle install --jobs 4 --retry 3
- name: Build Jekyll site
run: bundle exec jekyll build

- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: jekyll-site
path: ./_site

# Deployment job
deploy:
Expand Down

0 comments on commit fcb562f

Please sign in to comment.