fix(ci): stabilize Storybook GitHub Pages deploys#20819
Draft
vpomerleau wants to merge 1 commit into
Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Stabilizes Storybook preview publishing to GitHub Pages by preventing concurrent Pages deployments from colliding and by keeping the published gh-pages content from growing without bound (which has been causing deploy sync timeouts).
Changes:
- Serialize the Pages publish step by adding a dedicated
gh-pages-publishconcurrency group to the deploy job. - Extend the cleanup workflow to remove storybooks for stale open PRs and enforce a maximum number of retained PR storybook directories.
- Update cleanup commit messaging to reflect broader pruning behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
.github/workflows/deploy-storybooks.yml |
Adds a dedicated concurrency group to serialize GitHub Pages publishes. |
.github/workflows/cleanup-storybooks.yml |
Prunes stale open-PR storybooks and enforces a retention cap to keep the Pages payload bounded. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
de30a24 to
378a8e6
Compare
Comment on lines
+61
to
+63
| else | ||
| echo "::warning::Keeping pr-${PR_NUMBER}: PR lookup failed, will retry next run (${META})" | ||
| fi |
| REMOVED=$((REMOVED + 1)) | ||
| else | ||
| echo "Keeping storybook for PR #${PR_NUMBER} (state: ${STATE})" | ||
| KEPT+=("${UPDATED_TS} ${PR_NUMBER} ${dir}") |
Because: - The deploy-to-Pages job fails intermittently: concurrent runs collide on the single Pages environment, and the sync step times out as the gh-pages site grows unbounded with open-PR storybooks. This commit: - Serializes the deploy job with its own concurrency group. - Prunes stale open-PR storybooks and caps how many are retained.
378a8e6 to
d7c245b
Compare
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.
Because
continue-on-error: true(workflow still shows green).gh-pagessite grows past ~2 GB with unbounded open-PR storybooks.This pull request
deployjob with its owngh-pages-publishconcurrency group so runs stop racing the Pages environment.Issue that this pull request solves
Closes: N/A
Checklist
Put an
xin the boxes that applyHow to review (Optional)
Screenshots (Optional)
Please attach the screenshots of the changes made in case of change in user interface.
Other information (Optional)
mainafter merge.MAX_AGE_DAYS(14),MAX_KEEP(15).