From e33f96d9f1c6c7c1463453c72cecefdfa061ad91 Mon Sep 17 00:00:00 2001 From: John Rogers Date: Thu, 8 Oct 2026 14:41:05 +0100 Subject: [PATCH] Deploy only on push to main, one run at a time The pull_request closed trigger ran a second deploy alongside the push for every merged PR. The two raced to force-push gh-pages, and one failed. It also ran for PRs closed without merging, which published unmerged code to production. The push trigger already covers merges. A concurrency group now queues deploys so they can't collide. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/deploy-discovery.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-discovery.yml b/.github/workflows/deploy-discovery.yml index 7c1fa14160..b6ae610881 100644 --- a/.github/workflows/deploy-discovery.yml +++ b/.github/workflows/deploy-discovery.yml @@ -8,11 +8,13 @@ on: repository_dispatch: push: branches: ["main"] - pull_request: - types: closed - branches: ["main"] workflow_dispatch: +# One deploy at a time: concurrent runs race to force-push gh-pages +concurrency: + group: deploy-gh-pages + cancel-in-progress: false + jobs: build-and-deploy: runs-on: ubuntu-latest