From ddcefcf1faf8222b35fdee982496530608d15581 Mon Sep 17 00:00:00 2001 From: Bartosz Burda Date: Tue, 6 Oct 2026 11:01:45 +0200 Subject: [PATCH] ci(docs): give each PR its own docs concurrency group All Documentation runs shared the concurrency group `pages`. A group holds one running run and one waiting run, so a third run cancelled the waiting one, and a PR could end up with no docs build. PR runs now use one group per PR. A new push cancels only the older build of the same PR. Runs on main share one group, and a running build on main is never cancelled. The deploy job keeps the `pages` group, so only one Pages deployment runs at a time. --- .github/workflows/docs.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 565e0cdcc..c69b07ac4 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -23,9 +23,11 @@ permissions: pages: write id-token: write +# One group per PR, so docs builds of different PRs never cancel each other. +# A new push to a PR cancels that PR's older build only. concurrency: - group: "pages" - cancel-in-progress: false + group: docs-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: build-docs: @@ -77,6 +79,10 @@ jobs: runs-on: ubuntu-24.04 needs: build-docs if: github.ref == 'refs/heads/main' + # One Pages deployment at a time. + concurrency: + group: pages + cancel-in-progress: false steps: - name: Deploy to GitHub Pages id: deployment