CI: make the Storybook deploy check verify the preview is actually live#39
Open
ivoIturrieta wants to merge 1 commit into
Open
CI: make the Storybook deploy check verify the preview is actually live#39ivoIturrieta wants to merge 1 commit into
ivoIturrieta wants to merge 1 commit into
Conversation
The build-and-deploy check could pass while the preview stayed stale: pushing to gh-pages succeeds, but GitHub's own Pages publish step can fail transiently afterwards — and it does not auto-retry, so the site keeps serving the previous artifact under a green check. The artifact now carries a build-id stamp, and a verify step polls the deployed URL (PR subdirectory or root) until it serves this run's stamp, failing loudly after ~10 minutes with recovery instructions. Green now means live. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR strengthens the Storybook GitHub Pages deployment workflow so the build-and-deploy check only passes once GitHub Pages is actually serving the newly deployed build (not a stale previous artifact).
Changes:
- Add a build stamp file (
build-id.txt) containing the workflowrun_idinto the built Storybook output. - After deploy, poll the published
build-id.txtURL (with cache-busting) until it matches the currentrun_id, failing after ~10 minutes with recovery instructions.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
What
The
build-and-deploycheck could show green while the deployed preview stayed stale (it happened on #37 today): the workflow's push togh-pagessucceeds, but GitHub's internal Pages publish step can fail transiently afterwards — and legacy Pages does not auto-retry, so the site keeps serving the previous artifact under a passing check.How
build-id.txt)gh api -X POST repos/<repo>/pages/buildsre-triggers the publish)Green now means "this exact build is being served", not "handed off to GitHub".
🤖 Generated with Claude Code
📖 Storybook Preview: https://unlayer.github.io/elements/pr/39/