Skip to content

Commit

Permalink
Create jekyll-gh-pages.yml
Browse files Browse the repository at this point in the history
Signed-off-by: 瑞 <[email protected]>
  • Loading branch information
laorui authored Sep 5, 2024
1 parent 332d6a5 commit 23f5c6b
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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

1 comment on commit 23f5c6b

@laorui
Copy link
Owner Author

@laorui laorui commented on 23f5c6b Sep 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

この文章は日本语の初心者にどても役立ちます。

Please sign in to comment.