ci: deploy docs/ to Pages via a concurrency-guarded Actions workflow#28
Open
IvanBBaev wants to merge 1 commit into
Open
ci: deploy docs/ to Pages via a concurrency-guarded Actions workflow#28IvanBBaev wants to merge 1 commit into
IvanBBaev wants to merge 1 commit into
Conversation
The auto-generated legacy pages-build-deployment (branch/`docs` source) has no
concurrency guard, so bursts of pushes to main raced on the single Pages
environment and the losers failed with "Deployment failed, try again later"
(the site stayed live via the last successful deploy, but the Actions tab went
red). Replace it with a dedicated workflow that (1) only deploys when docs/
actually changes and (2) serializes deploys via
`concurrency: { group: pages, cancel-in-progress: false }`. Content is served
verbatim (docs/.nojekyll marks it as plain static HTML).
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
GitHub Pages for this repo is served by the auto-generated legacy
pages-build-deploymentpipeline (source:main→/docs). That pipeline hasno concurrency guard. When several commits land on
mainin quicksuccession (e.g. a run of dependabot / dependency-bump merges), each triggers
its own Pages deploy, and because GitHub Pages allows only one active
deployment they race — the losers die with the generic
Deployment failed, try again later.The site itself stays live (the last successful deploy wins), but the Actions
tab alternates green/red. Observed today: 13:26 ✅, 13:31 ❌, 13:38 ✅, 13:48 ❌.
Fix
A dedicated Pages workflow that:
paths: docs/**), sodependency bumps no longer trigger a Pages deploy at all.
concurrency: { group: pages, cancel-in-progress: false }— a constant group(no
github.ref) queues every deploy behind the previous one instead ofracing it;
cancel-in-progress: falselets an in-flight deploy finish.Content is served verbatim:
docs/.nojekyllmarks it as plain static HTML,so
upload-pages-artifactuploads the wholedocs/tree unchanged — identicalto what the legacy build served. Actions are SHA-pinned per repo convention.
Cutover (after merge)
The repo's Pages source must be switched from "Deploy from a branch" to
"GitHub Actions" (
build_type: workflow) for this workflow's deploy step totake effect. The site keeps serving the last deployment during the switch — no
downtime, no content lost.