From a7793052467bf1507ff0a9f78fb55acc56786e84 Mon Sep 17 00:00:00 2001 From: Erik Darling <2136037+erikdarlingdata@users.noreply.github.com> Date: Sun, 22 Nov 2026 09:50:02 -0500 Subject: [PATCH] Deploy Web App: build and deploy in separate jobs deploy-pages listed the run's artifacts a fraction of a second after upload-pages-artifact finalized in the same job and found none (actions/deploy-pages#451). That failed the v1.32.0 web deploy twice, and a re-run uploads a second github-pages artifact, which deploy-pages rejects. The build job now runs the repository code with a contents: read token, and only the deploy job holds pages: write and id-token: write. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01M98owbb9iKsAUWvSpjCFTz --- .github/workflows/deploy-web.yml | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy-web.yml b/.github/workflows/deploy-web.yml index 1676d3a..7c9b2e9 100644 --- a/.github/workflows/deploy-web.yml +++ b/.github/workflows/deploy-web.yml @@ -14,19 +14,18 @@ on: permissions: contents: read - pages: write - id-token: write concurrency: group: pages cancel-in-progress: true jobs: - deploy: + # Build and deploy are separate jobs. In one job, deploy-pages can list the + # run's artifacts a fraction of a second after upload-pages-artifact finalizes + # and find none (actions/deploy-pages#451), and re-running that job uploads a + # second github-pages artifact, which deploy-pages also rejects. + build: runs-on: ubuntu-latest - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -56,6 +55,18 @@ jobs: with: path: publish/wwwroot + deploy: + needs: 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: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1