-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (45 loc) · 2.58 KB
/
jekyll-gh-pages.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Sample workflow for building and deploying a Jekyll site to GitHub Pages构建和部署Jekyll站点到GitHub Pages的示例工作流
name: Deploy Jekyll with GitHub Pages dependencies preinstalled部署Jekyll并预装GitHub Pages依赖项
on: :
# Runs on pushes targeting the default branch#针对默认分支推送运行
push: 推动:
branches: ["main"] 分支机构(“主要”):
# Allows you to run this workflow manually from the Actions tab#允许您从Actions选项卡手动运行此工作流
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages#设置GITHUB_TOKEN的权限,允许部署到GitHub页面
permissions: 权限:
contents: read 内容:读
pages: write 页:写
id-token: write id-token:写
# 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 cancel-in-progress:假
jobs: 工作:
# Build job #构建任务
build: 构建:
runs-on: ubuntu-latest 上运行:ubuntu-latest
steps: 步骤:
- name: Checkout -名称:Checkout
uses: actions/checkout@v4 用途:行动/ checkout@v4
- name: Setup Pages —name:设置页面
uses: actions/configure-pages@v5用途:行动/ configure-pages@v5
- name: Build with Jekyll -名称:建立与杰基尔
uses: actions/jekyll-build-pages@v1用途:行动/ jekyll-build-pages@v1
with: :
source: ./ 来源:。/
destination 目的地: ./_site 目的地:。/ _site
- name 名字: Upload artifact —name:上传工件
uses 使用: actions/upload-pages-artifact@v3用途:行动/ upload-pages-artifact@v3
#部署作业# Deployment job #部署作业
deploy 部署:
environment 环境:
name 名字: github-pages 名称:github-pages
url: $Url: ${{steps.deployment.output .page_url}}{{ steps.deployment.outputs.page_url }}
runs-on 运行在: ubuntu-latest 上运行:ubuntu-latest
needs 需要: build 需求:构建
steps 步骤:
- name 名字: Deploy to GitHub Pages- name:部署到GitHub页面
id: deployment id:部署
uses 使用: actions/deploy-pages@v4用途:行动/ deploy-pages@v4