Skip to content

ci: per-branch publish concurrency with gh-pages push retry - #35

Merged
pfeerick merged 1 commit into
edgetx_2.12from
publish-concurrency
Oct 23, 2026
Merged

pfeerick merged 1 commit into
edgetx_2.12from
publish-concurrency

Conversation

@pfeerick

Copy link
Copy Markdown
Member

Problem

The publish workflow used one workflow-wide concurrency group. GitHub keeps at most one pending run per group and cancels older pending ones, even with cancel-in-progress: false. When the 2.4–2.11 conversions (#23–#30) merged together, six of the eight publish runs were cancelled before they ran, and those versions weren't republished until I dispatched them by hand. This can happen any time three or more pushes land within about a minute.

Fix

The workflow is now two jobs:

  • publish has one concurrency group per branch (publish-versioned-docs-<branch>). Cancelling a superseded pending run on the same branch is harmless, because the newest push already contains it. Different branches build in parallel. If another branch pushes to gh-pages first, mike's push is rejected as non-fast-forward. The job then resets to the new tip, rebuilds, and retries, up to 5 attempts with backoff.
  • deploy has one group shared across all branches, so Cloudflare uploads never overlap. It exports gh-pages when the job starts. If several uploads are queued and GitHub keeps only the newest, that one already includes every earlier publish, so the last upload is always the newest tree.

Testing

Simulated the race locally with a bare copy of gh-pages as origin, plus a one-shot pre-push hook that pushes a competing commit from another clone just before mike's push:

  • Old workflow: mike deploy --push fails with remote rejected … incorrect old value provided, and the job fails.
  • New loop (run under bash -eo pipefail, like Actions): attempt 1 is rejected, attempt 2 rebuilds on top and succeeds. Both the competing commit and the new deploy are on gh-pages.

Rollout

Every branch carries its own identical copy of this workflow. After this merges, the same file needs to go to main (through #17) and to edgetx_2.4–edgetx_2.11. Until then, those branches keep the old single group and have no retry. A collision there shows up as a failed run, not a silently missing version.

🤖 Generated with Claude Code

A single workflow-wide concurrency group dropped publishes: GitHub keeps
only one pending run per group, so when the 2.4-2.11 conversions merged
together, six of the eight runs were cancelled before they ran.

Split the workflow into two jobs:
- publish: one concurrency group per branch (a superseded pending run is
  harmless, since the newest push contains it). Branches build in
  parallel; if another branch updates gh-pages first, mike's push is
  rejected and the job rebuilds on the new tip and retries.
- deploy: one group across all branches for the Cloudflare upload. It
  exports gh-pages when it starts, so whichever queued upload survives
  already includes every earlier publish.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

📖 Docs preview: https://pr-35-edgetx-lua-reference-guide.edgetx.workers.dev/2.12/

Built from 6ae4e47 as the 2.12 version, on top of the currently published site.

@pfeerick
pfeerick merged commit 3b03522 into edgetx_2.12 Oct 23, 2026
2 checks passed
@pfeerick
pfeerick deleted the publish-concurrency branch October 23, 2026 09:59
pfeerick added a commit that referenced this pull request Oct 23, 2026
Brings in per-branch publish concurrency with gh-pages push retry
(#35), so this branch's copy matches every other branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pfeerick added a commit that referenced this pull request Oct 23, 2026
Brings in per-branch publish concurrency with gh-pages push retry
(#35), so this branch's copy matches every other branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pfeerick added a commit that referenced this pull request Oct 23, 2026
Brings in per-branch publish concurrency with gh-pages push retry
(#35), so this branch's copy matches every other branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pfeerick added a commit that referenced this pull request Oct 23, 2026
Brings in per-branch publish concurrency with gh-pages push retry
(#35), so this branch's copy matches every other branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pfeerick added a commit that referenced this pull request Oct 23, 2026
Brings in per-branch publish concurrency with gh-pages push retry
(#35), so this branch's copy matches every other branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pfeerick added a commit that referenced this pull request Oct 23, 2026
Brings in per-branch publish concurrency with gh-pages push retry
(#35), so this branch's copy matches every other branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pfeerick added a commit that referenced this pull request Oct 23, 2026
Brings in per-branch publish concurrency with gh-pages push retry
(#35), so this branch's copy matches every other branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pfeerick added a commit that referenced this pull request Oct 23, 2026
Brings in per-branch publish concurrency with gh-pages push retry
(#35), so this branch's copy matches every other branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant