From 08af82cbe868e698d9473adaf6d553078942ad24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Wed, 29 Apr 2026 14:37:48 +0200 Subject: [PATCH] fix: prevent deploy race condition when pushing versioned artifacts Add concurrency control to queue workflow runs and pull-rebase before push so the commit step handles a main branch that moved since checkout. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/build-and-deploy.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index b2c6c109..bbcef16b 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -25,6 +25,10 @@ on: default: 'main' type: string +concurrency: + group: docs-build-deploy + cancel-in-progress: false + permissions: contents: write pages: write @@ -254,6 +258,7 @@ jobs: git config --local user.name "github-actions[bot]" git add "docs/${{ env.VERSION_TAG }}/" versionsArchived.json git diff --staged --quiet || git commit -s -m "docs: add archived version ${{ env.VERSION_TAG }}" + git pull --rebase origin main git push # ──────────────────────────────────────────────