Skip to content

Commit 2968ef3

Browse files
authored
Update jekyll.yml
1 parent 96b937b commit 2968ef3

File tree

1 file changed

+34
-33
lines changed

1 file changed

+34
-33
lines changed

.github/workflows/jekyll.yml

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,78 @@
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
7-
name: Deploy Jekyll site to Pages
1+
# Workflow for building and deploying a Jekyll site to GitHub Pages and Tencent
2+
name: Deploy Jekyll Site
83

94
on:
10-
# Runs on pushes targeting the default branch
5+
# Trigger on pushes to the default branch
116
push:
127
branches: ["main"]
138

14-
# Allows you to run this workflow manually from the Actions tab
9+
# Allow manual trigger from Actions tab
1510
workflow_dispatch:
1611

17-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
12+
# Permissions for GitHub Pages deployment
1813
permissions:
1914
contents: read
2015
pages: write
2116
id-token: write
2217

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.
18+
# Ensure only one concurrent deployment per branch
2519
concurrency:
26-
group: "pages"
20+
group: "pages-deploy"
2721
cancel-in-progress: false
2822

2923
jobs:
30-
# Build job
24+
# Build Job
3125
build:
3226
runs-on: ubuntu-latest
3327
steps:
34-
- name: Checkout
28+
- name: Checkout Code
3529
uses: actions/checkout@v4
36-
- name: Setup Ruby
37-
uses: ruby/setup-ruby@v1 # v1.146.0
30+
31+
- name: Setup Ruby Environment
32+
uses: ruby/setup-ruby@v1
3833
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
42-
- name: Setup Pages
34+
ruby-version: '3.1'
35+
bundler-cache: true
36+
cache-version: 0
37+
38+
- name: Configure Pages
4339
id: pages
4440
uses: actions/configure-pages@v3
45-
- name: Build with Jekyll
46-
# Outputs to the './_site' directory by default
41+
42+
- name: Build Jekyll Site
4743
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
4844
env:
4945
JEKYLL_ENV: production
50-
- name: Upload artifact
51-
# Automatically uploads an artifact from the './_site' directory by default
46+
47+
- name: Upload Site Artifact
5248
uses: actions/upload-pages-artifact@v1
5349
with:
5450
name: site-artifact
5551

56-
# Deployment job
57-
deploy:
52+
# Deployment Job to GitHub Pages
53+
deploy-pages:
54+
runs-on: ubuntu-latest
55+
needs: build
5856
environment:
5957
name: github-pages
6058
url: ${{ steps.deployment.outputs.page_url }}
61-
runs-on: ubuntu-latest
62-
needs: build
6359
steps:
6460
- name: Deploy to GitHub Pages
6561
id: deployment
6662
uses: actions/deploy-pages@v2
6763

68-
- name: Download artifact
69-
uses: actions/download-pages-artifact@v1
64+
# Deployment Job to Tencent
65+
deploy-tencent:
66+
runs-on: ubuntu-latest
67+
needs: build
68+
steps:
69+
- name: Download Site Artifact
70+
uses: actions/download-artifact@v3
7071
with:
7172
name: site-artifact
7273
path: _site
73-
74-
- name: Deploy to Tencent
74+
75+
- name: Deploy to Tencent Cloud
7576
uses: easingthemes/ssh-deploy@main
7677
env:
7778
SSH_PRIVATE_KEY: ${{ secrets.CLOUD_DEPLOY_SSH }}

0 commit comments

Comments
 (0)