From 7b27e1875f2570d7f2e7507db61abfb6257628e0 Mon Sep 17 00:00:00 2001 From: Roonil03 Date: Tue, 3 Nov 2026 19:21:33 +0530 Subject: [PATCH 1/2] Avoid competing GitHub Pages deployments Keep the scheduled and push-triggered ratings refresh, build, root synchronization, and github-actions[bot] commit. Let the repository's existing main-root Pages publisher deploy those committed files, removing the second artifact deployment that races GitHub's Pages build. --- .github/workflows/deploy-pages.yml | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml index 19ab645..2cd2b5c 100644 --- a/.github/workflows/deploy-pages.yml +++ b/.github/workflows/deploy-pages.yml @@ -1,4 +1,4 @@ -name: Refresh Ratings and Deploy +name: Refresh Ratings and Publish on: push: @@ -25,20 +25,15 @@ permissions: contents: read concurrency: - group: "pages" + group: "ratings-refresh" cancel-in-progress: false jobs: - refresh-build-deploy: + refresh-build-publish: if: github.event_name != 'workflow_dispatch' || github.ref_name == github.event.repository.default_branch - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} runs-on: windows-latest permissions: contents: write - pages: write - id-token: write steps: - name: Checkout repository uses: actions/checkout@v5 @@ -120,21 +115,3 @@ jobs: if ($LASTEXITCODE -ne 0) { throw 'Could not commit published changes.' } git push origin "HEAD:refs/heads/$env:TARGET_BRANCH" if ($LASTEXITCODE -ne 0) { throw 'Could not push published changes.' } - - - name: Setup Pages - uses: actions/configure-pages@v5 - - - name: Upload built site - uses: actions/upload-pages-artifact@v3 - with: - path: './dist' - - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 - - - name: Verify published site - shell: pwsh - env: - PAGES_URL: ${{ steps.deployment.outputs.page_url }} - run: node scripts/verify-deployed-site.mjs "$env:PAGES_URL" From fa9a8282580479d28a87b10883c408791d0a55e3 Mon Sep 17 00:00:00 2001 From: Roonil03 Date: Tue, 3 Nov 2026 19:25:02 +0530 Subject: [PATCH 2/2] Sequence Pages publishing before the ratings bot push Keep artifact deployment for scheduled and manual refreshes, then commit the built root site only after deployment and verification finish. Skip the custom Pages deployment on code pushes, where the branch-based Pages publisher is already active. This prevents the two deployment requests from overlapping. --- .github/workflows/deploy-pages.yml | 33 +++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml index 2cd2b5c..08e82fa 100644 --- a/.github/workflows/deploy-pages.yml +++ b/.github/workflows/deploy-pages.yml @@ -1,4 +1,4 @@ -name: Refresh Ratings and Publish +name: Refresh Ratings and Deploy on: push: @@ -25,15 +25,20 @@ permissions: contents: read concurrency: - group: "ratings-refresh" + group: "pages" cancel-in-progress: false jobs: - refresh-build-publish: + refresh-build-deploy: if: github.event_name != 'workflow_dispatch' || github.ref_name == github.event.repository.default_branch + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} runs-on: windows-latest permissions: contents: write + pages: write + id-token: write steps: - name: Checkout repository uses: actions/checkout@v5 @@ -97,6 +102,28 @@ jobs: shell: pwsh run: npm run check:pages-root + - name: Setup Pages + if: github.event_name != 'push' + uses: actions/configure-pages@v5 + + - name: Upload built site + if: github.event_name != 'push' + uses: actions/upload-pages-artifact@v3 + with: + path: './dist' + + - name: Deploy to GitHub Pages + if: github.event_name != 'push' + id: deployment + uses: actions/deploy-pages@v4 + + - name: Verify published site + if: github.event_name != 'push' + shell: pwsh + env: + PAGES_URL: ${{ steps.deployment.outputs.page_url }} + run: node scripts/verify-deployed-site.mjs "$env:PAGES_URL" + - name: Commit updated ratings and published site shell: pwsh env: