From af3aa6a8d58f144d39c8cedba70a4a385c3fb15c Mon Sep 17 00:00:00 2001 From: Zhihua Lai Date: Fri, 10 Jul 2026 19:58:12 +0100 Subject: [PATCH] Fix CI --- .github/workflows/pages.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index df3d0da..e700e35 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -1,7 +1,11 @@ name: Deploy GitHub Pages on: - push: + workflow_run: + workflows: + - CI + types: + - completed branches: - main workflow_dispatch: @@ -12,12 +16,16 @@ permissions: id-token: write concurrency: - group: pages - cancel-in-progress: false + group: github-pages + cancel-in-progress: true jobs: - build: + deploy: + if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }} runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} steps: - name: Checkout code @@ -32,7 +40,7 @@ jobs: - name: Install dependencies run: npm ci - - name: Build site + - name: Build static site run: npm run build - name: Configure GitHub Pages @@ -43,14 +51,6 @@ jobs: with: path: dist - deploy: - needs: build - runs-on: ubuntu-latest - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - - steps: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4