From 0a95470366c51e6623b48e36a3fed2d1150947eb Mon Sep 17 00:00:00 2001 From: paul lahana Date: Fri, 2 Oct 2026 13:09:08 -0400 Subject: [PATCH] ci: serialize deployments to prevent race conditions Add concurrency configuration to the deploy job to ensure only one deployment runs at a time. This prevents race conditions when multiple pushes to main occur in quick succession, where the slowest deployment could overwrite a faster one. Keep cancel-in-progress disabled to allow rolling updates to complete without interruption. --- .github/workflows/deploy.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a8629c4..f271ba9 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -35,6 +35,12 @@ jobs: needs: test # deploy only runs if the test job passes # Only deploy on a push to main — never on pull requests. if: github.event_name == 'push' && github.ref == 'refs/heads/main' + # One deploy at a time: merges in a burst otherwise race on the same + # machines and the slowest one wins, not the latest. No cancel-in-progress, + # it would stop a rolling update halfway. + concurrency: + group: fly-deploy + cancel-in-progress: false steps: - uses: actions/checkout@v4