From ed21fda418fff174a4f0ed4d977d36c59837aa82 Mon Sep 17 00:00:00 2001 From: Atharva Arya Date: Tue, 3 Nov 2026 18:12:28 +0530 Subject: [PATCH] Make clean-docs wait for a running publish-docs on the same branch Release PRs auto-merge as soon as the docs build finishes, so clean-docs ran while publish-docs was still uploading the preview. The cleanup found no folder and the upload landed afterwards, leaving pull/N on gh-pages. A shared per-branch concurrency group stops the two jobs from running at the same time. --- .github/workflows/clean-docs.yml | 3 +++ .github/workflows/publish-docs.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/clean-docs.yml b/.github/workflows/clean-docs.yml index d0e33791680..469b1e21a3c 100644 --- a/.github/workflows/clean-docs.yml +++ b/.github/workflows/clean-docs.yml @@ -17,6 +17,9 @@ env: jobs: clean: + concurrency: # shared with publish-docs so cleaning waits for a running publish + group: docs-preview-${{ github.head_ref || github.event.ref }} + cancel-in-progress: false runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index 96371d52937..a2b690dd9d4 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -14,6 +14,9 @@ permissions: jobs: publish: + concurrency: # shared with clean-docs so a preview is never published while it is being cleaned + group: docs-preview-${{ github.event.workflow_run.head_branch }} + cancel-in-progress: false if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.repository.full_name == github.repository runs-on: ubuntu-latest env: