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