diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index ba5991d..721b254 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -8,9 +8,12 @@ on: tags: '*' pull_request: +# Prevent simultaneous gh-pages deployments (tag + branch race condition). +# PR previews each get their own group and cancel on new pushes. +# All other deploys (main, tags) share one group and queue instead of cancel. concurrency: - group: docs-deploy - cancel-in-progress: false + group: ${{ github.event_name == 'pull_request' && format('docs-pr-{0}', github.event.pull_request.number) || 'docs-deploy' }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: build: