From db5b7f947d023a5b514c0a07557adb2c8273f76c Mon Sep 17 00:00:00 2001 From: CKlimeths Date: Tue, 12 Nov 2024 21:54:14 +0800 Subject: [PATCH] Refactor GitHub Pages deploy workflow structure --- .github/workflows/deploy-gh-pages.yaml | 33 +++++++++----------------- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/.github/workflows/deploy-gh-pages.yaml b/.github/workflows/deploy-gh-pages.yaml index 97fe453..201fc82 100644 --- a/.github/workflows/deploy-gh-pages.yaml +++ b/.github/workflows/deploy-gh-pages.yaml @@ -11,27 +11,26 @@ on: # 这个选项可以使你手动在 Action tab 页面触发工作流 workflow_dispatch: -# 权限 -permissions: - contents: read - pages: write - id-token: write - -# 环境变量 -environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - jobs: # 构建 build: # 运行环境 runs-on: ubuntu-latest + # 权限 + permissions: + contents: read + pages: write + id-token: write + + # 环境变量 + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + # 步骤 steps: - name: Checkout - description: 'Checkout the repository, so we can use it with actions' uses: actions/checkout@v4.2.2 - name: Set up Node.js @@ -53,16 +52,6 @@ jobs: with: path: './dist' - # 部署 - deploy: - # 依赖 - needs: build - - # 运行环境 - runs-on: ubuntu-latest - - # 步骤 - steps: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4