Skip to content

fix(ci): add stable storybook/ path for permanent Storybook links - #758

Merged
rubyycheung merged 2 commits into
mainfrom
navi/fix/stable-latest-deploy-v2
Mar 20, 2026
Merged

rubyycheung merged 2 commits into
mainfrom
navi/fix/stable-latest-deploy-v2

Conversation

@rubyycheung

Copy link
Copy Markdown
Contributor

Problem

Storybook links in shared docs keep breaking because the deploy workflow publishes to <hash>/ directories that get cleaned up over time.

Fix

Deploy workflow now also copies the Storybook build to a stable storybook/ directory. Links like:

studious-broccoli-o7e61n3.pages.github.io/storybook/index.html?path=/docs/core-xdsbutton--docs

will always work regardless of hash directory cleanup. The storybook/ directory gets overwritten on every push to main, so it's always up to date.

Same change also adds a stable sandbox/ directory.

Cloned from #755.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Mar 20, 2026
@rubyycheung
rubyycheung enabled auto-merge (squash) March 20, 2026 18:32
@github-actions

github-actions Bot commented Mar 20, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

No new or modified components detected.

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@xds/core 10.7KB 17.0KB 2.6KB

Accessibility Audit

Status: No accessibility violations detected.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

@josephfarina
josephfarina changed the base branch from main to navi/fix/codeowner-gate-upsert March 20, 2026 18:35
@josephfarina
josephfarina changed the base branch from navi/fix/codeowner-gate-upsert to main March 20, 2026 18:36
Two changes:
1. Deploy workflow now also copies the Storybook build to a stable
   storybook/ directory. Links like .../storybook/index.html?path=...
   will always work regardless of hash directory cleanup.

2. Cleanup workflow now reads the latest file and protects that hash
   from deletion — prevents the race where main HEAD advances but the
   previous deploy gets cleaned up before the new one lands.
The existing LATEST_DEPLOYED git-log logic already handles protecting
the most recent deploy. Keeping this PR focused on the stable storybook/ path.
@rubyycheung
rubyycheung force-pushed the navi/fix/stable-latest-deploy-v2 branch from a84a8be to 629058d Compare March 20, 2026 18:44
@rubyycheung
rubyycheung merged commit f77b519 into main Mar 20, 2026
8 checks passed
@cixzhang
cixzhang deleted the navi/fix/stable-latest-deploy-v2 branch April 9, 2026 14:33
cixzhang pushed a commit that referenced this pull request Apr 26, 2026
* fix(ci): add stable storybook/ path + protect latest deploy from cleanup

Two changes:
1. Deploy workflow now also copies the Storybook build to a stable
   storybook/ directory. Links like .../storybook/index.html?path=...
   will always work regardless of hash directory cleanup.

2. Cleanup workflow now reads the latest file and protects that hash
   from deletion — prevents the race where main HEAD advances but the
   previous deploy gets cleaned up before the new one lands.

* remove cleanup-previews changes per review

The existing LATEST_DEPLOYED git-log logic already handles protecting
the most recent deploy. Keeping this PR focused on the stable storybook/ path.
cixzhang pushed a commit that referenced this pull request Jun 21, 2026
* fix(ci): add stable storybook/ path + protect latest deploy from cleanup

Two changes:
1. Deploy workflow now also copies the Storybook build to a stable
   storybook/ directory. Links like .../storybook/index.html?path=...
   will always work regardless of hash directory cleanup.

2. Cleanup workflow now reads the latest file and protects that hash
   from deletion — prevents the race where main HEAD advances but the
   previous deploy gets cleaned up before the new one lands.

* remove cleanup-previews changes per review

The existing LATEST_DEPLOYED git-log logic already handles protecting
the most recent deploy. Keeping this PR focused on the stable storybook/ path.
cixzhang pushed a commit that referenced this pull request Jun 21, 2026
* fix(ci): add stable storybook/ path + protect latest deploy from cleanup

Two changes:
1. Deploy workflow now also copies the Storybook build to a stable
   storybook/ directory. Links like .../storybook/index.html?path=...
   will always work regardless of hash directory cleanup.

2. Cleanup workflow now reads the latest file and protects that hash
   from deletion — prevents the race where main HEAD advances but the
   previous deploy gets cleaned up before the new one lands.

* remove cleanup-previews changes per review

The existing LATEST_DEPLOYED git-log logic already handles protecting
the most recent deploy. Keeping this PR focused on the stable storybook/ path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants