diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1cf6952..eba58c0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -7,6 +7,14 @@ on: permissions: contents: write +# Use a single shared concurrency group so all runs that write to gh-pages are +# serialised. A per-ref group still allows concurrent writes from different +# triggers and causes rebase conflicts on the gh-pages branch. +# cancel-in-progress: false ensures queued runs still execute. +concurrency: + group: gh-pages + cancel-in-progress: false + jobs: deploy: runs-on: ubuntu-latest diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 9ceca9b..9e465c9 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -12,7 +12,15 @@ permissions: contents: write pull-requests: write -concurrency: preview-${{ github.ref }} +# Use a single shared concurrency group so all runs that write to gh-pages are +# serialised. "preview-${{ github.ref }}" only serialises per PR, which still +# allows concurrent writes from different PRs (or synchronize vs. closed events) +# and causes "remote contains work not present locally" / rebase conflicts. +# cancel-in-progress: false ensures queued runs still execute (important for +# the "closed" event that removes a preview). +concurrency: + group: gh-pages + cancel-in-progress: false jobs: deploy-preview: