From 23f5c6bde27532ef47d714a7aba945865d3103fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=91=9E?= Date: Thu, 5 Sep 2024 17:12:03 +0800 Subject: [PATCH] Create jekyll-gh-pages.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 瑞 --- .github/workflows/jekyll-gh-pages.yml | 51 +++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/jekyll-gh-pages.yml diff --git a/.github/workflows/jekyll-gh-pages.yml b/.github/workflows/jekyll-gh-pages.yml new file mode 100644 index 0000000..081562c --- /dev/null +++ b/.github/workflows/jekyll-gh-pages.yml @@ -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