From 936baa2b5d0d1a6d016110adfb4c828434b80fda Mon Sep 17 00:00:00 2001 From: Casey Ellis Date: Sun, 12 Jul 2026 21:16:26 -0700 Subject: [PATCH] fix(ci): stop PR builds cancelling each other and blocking on deploys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit hugo.yml put every run — deploys AND pull-request validation builds — into a single global concurrency group named "pages". GitHub allows one running and one pending run per group, so a third contender cancels the pending one. The visible consequence: when Dependabot opened 10 PRs at once, they all contended for that one slot and cancelled each other. Two got a build; eight were cancelled; the PRs sat for a week with no CI at all, which read as "checks not configured" rather than "checks were cancelled". Merging any of them would have been merging blind — and one of them is a Tailwind v3 -> v4 major that breaks the CSS build outright. Deploys still serialize on "pages" (only one Pages deployment can be in flight). PR builds now get a per-ref group, so they neither cancel each other nor contend with a production deploy. Superseded PR builds cancel; deploys never do. --- .github/workflows/hugo.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/hugo.yml b/.github/workflows/hugo.yml index fa00af8..85a54ed 100644 --- a/.github/workflows/hugo.yml +++ b/.github/workflows/hugo.yml @@ -13,9 +13,13 @@ permissions: pages: write id-token: write +# Deploys (push to main) serialize on a single "pages" group, because only one +# deployment to GitHub Pages can be in flight at a time. PR validation builds +# get their own per-ref group so they neither cancel each other nor contend +# with a production deploy. Superseded PR builds are cancelled; deploys are not. concurrency: - group: "pages" - cancel-in-progress: false + group: ${{ github.event_name == 'pull_request' && format('pages-pr-{0}', github.ref) || 'pages' }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} defaults: run: