feat: auto deploy branches to github page - #426
Open
adrienzheng-cb wants to merge 1 commit into
Open
Conversation
adrienzheng-cb
temporarily deployed
to
production
February 24, 2026 04:57 — with
GitHub Actions
Inactive
adrienzheng-cb
temporarily deployed
to
production
February 24, 2026 04:58 — with
GitHub Actions
Inactive
adrienzheng-cb
temporarily deployed
to
production
February 24, 2026 06:25 — with
GitHub Actions
Inactive
adrienzheng-cb
temporarily deployed
to
production
February 24, 2026 06:32 — with
GitHub Actions
Inactive
adrienzheng-cb
temporarily deployed
to
production
February 24, 2026 06:44 — with
GitHub Actions
Inactive
adrienzheng-cb
temporarily deployed
to
production
February 24, 2026 06:53 — with
GitHub Actions
Inactive
adrienzheng-cb
temporarily deployed
to
production
February 24, 2026 15:26 — with
GitHub Actions
Inactive
adrienzheng-cb
temporarily deployed
to
production
February 24, 2026 20:20 — with
GitHub Actions
Inactive
adrienzheng-cb
force-pushed
the
adrien/preview-cds
branch
from
February 24, 2026 21:21
e7cdf45 to
683eecd
Compare
adrienzheng-cb
temporarily deployed
to
production
February 24, 2026 21:21 — with
GitHub Actions
Inactive
adrienzheng-cb
force-pushed
the
adrien/preview-cds
branch
from
February 24, 2026 21:26
683eecd to
9ee3b9f
Compare
adrienzheng-cb
temporarily deployed
to
production
February 24, 2026 21:26 — with
GitHub Actions
Inactive
adrienzheng-cb
force-pushed
the
adrien/preview-cds
branch
from
February 24, 2026 21:27
9ee3b9f to
6b424ba
Compare
adrienzheng-cb
temporarily deployed
to
production
February 24, 2026 21:27 — with
GitHub Actions
Inactive
adrienzheng-cb
temporarily deployed
to
production
February 24, 2026 21:57 — with
GitHub Actions
Inactive
adrienzheng-cb
force-pushed
the
adrien/preview-cds
branch
from
February 24, 2026 22:00
ae7577d to
398ec1a
Compare
adrienzheng-cb
temporarily deployed
to
production
February 24, 2026 22:00 — with
GitHub Actions
Inactive
adrienzheng-cb
temporarily deployed
to
production
February 24, 2026 22:31 — with
GitHub Actions
Inactive
adrienzheng-cb
force-pushed
the
adrien/preview-cds
branch
from
February 24, 2026 22:54
884e818 to
089f730
Compare
adrienzheng-cb
temporarily deployed
to
production
February 24, 2026 22:54 — with
GitHub Actions
Inactive
adrienzheng-cb
temporarily deployed
to
production
February 24, 2026 23:07 — with
GitHub Actions
Inactive
Contributor
|
Thing to keep in mind
|
adrienzheng-cb
force-pushed
the
adrien/preview-cds
branch
from
May 4, 2026 18:52
9413ffc to
55bca79
Compare
adrienzheng-cb
force-pushed
the
adrien/preview-cds
branch
2 times, most recently
from
July 31, 2026 16:51
ddf3644 to
73781e0
Compare
Collaborator
🟡 Heimdall Review Status
🟡
|
| Code Owner | Status | Calculation | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| ui-systems-eng-team |
🟡
0/1
|
Denominator calculation
|
adrienzheng-cb
force-pushed
the
adrien/preview-cds
branch
from
July 31, 2026 17:04
73781e0 to
600d2f8
Compare
Contributor
🚀 Previews DeployedYour previews are ready! 📄 Documentation: View Docs → 📝 Updated:
|
adrienzheng-cb
force-pushed
the
adrien/preview-cds
branch
from
July 31, 2026 17:13
600d2f8 to
f126a7b
Compare
adrienzheng-cb
force-pushed
the
adrien/preview-cds
branch
from
July 31, 2026 17:27
e7c198e to
680cd8b
Compare
Automatically publish live previews of the docs site and Storybook to the gh-pages branch for every PR, browsable via a preview-selector landing page. - Authors opt in per-PR via checkboxes in the PR description; checking deploys a preview, unchecking tears it down (no new commit required). - Everything coexists on one gh-pages branch: / = selector, /pr-<n>/* = previews, /figma-audit/ = the Figma integration audit report. The audit now publishes into gh-pages:/figma-audit/ instead of using actions/deploy-pages, so it no longer takes over the whole Pages site. - Non-lossy concurrency: pushes to gh-pages use an orphan-commit + force-with-lease re-apply loop with backoff, shared by the preview and audit jobs. - Builds are gated on nx affected and reuse a persisted Nx cache; BASE_URL / STORYBOOK_BASE_PATH are part of the cache key so per-PR and prod builds never collide. Storybook previews use a relative asset base. - Writes .nojekyll so branch-served Pages publishes assets verbatim, and warns as gh-pages approaches the ~1GB limit. - A single marker comment on the PR is kept up to date (stale duplicates are removed); scheduled + manual cleanup workflows prune closed/orphaned previews. Workflows: preview-deploy, preview-cleanup, preview-reap, preview-manual-cleanup, preview-squash-ghpages; app: apps/preview-selector. One-time setup: set GitHub Pages Source to "Deploy from a branch" -> gh-pages / (root). This PR must merge to master so master no longer runs deploy-pages. Co-authored-by: Cursor <cursoragent@cursor.com>
adrienzheng-cb
force-pushed
the
adrien/preview-cds
branch
from
July 31, 2026 17:28
680cd8b to
30e46f5
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.
What changed? Why?
Adds an automated PR preview deployment system that publishes live previews of the documentation site and Storybook to GitHub Pages for every pull request, plus a landing page (
preview-selector) to browse active previews.How it works
gh-pagesbranch underpr-<number>/…, served at:https://coinbase.github.io/cds/pr-<number>/docs/https://coinbase.github.io/cds/pr-<number>/storybook/gh-pagesbranch:/= preview selector,/pr-<number>/*= previews,/figma-audit/= the Figma integration audit report.Components
.github/workflows/preview-deploy.yml— build + deploy previews on PR open/update/edit.github/workflows/preview-cleanup.yml— remove previews on PR close.github/workflows/preview-reap.yml— scheduled sweep that prunes previews for PRs that are no longer open.github/workflows/preview-manual-cleanup.yml— manual cleanup tool.github/workflows/figma.yml— the Figma audit now publishes intogh-pages:/figma-audit/(see below) instead of taking over the whole Pages siteapps/preview-selector/— React app listing active previews (readsmanifest.json).github/scripts/*— manifest update/remove helpersCoexisting with the Figma audit (single Pages site)
Previously the
audit-figma-integrationsjob usedactions/deploy-pages, which replaces the entire Pages site on every push tomaster— that clobbered allpr-<n>/*previews (they 404'd while/served the audit). It now publishes intogh-pages:/figma-audit/using the same non-lossy orphan-commit +--force-with-leaseflow as the preview deploy, touching only its own subtree. Both systems now share one branch without conflict.Reliability & performance hardening
gh-pagesuse a re-fetch/re-apply loop with 8 attempts and exponential backoff (rather than GitHub's lossy concurrency queue), shared by both the preview and Figma-audit jobs.nx affected(an app is only rebuilt when it changed or has no existing preview, so links never 404).BASE_URL/STORYBOOK_BASE_PATHare part of the Nx cache key so per-PR and production builds never collide.STORYBOOK_BASE_PATH) so they work under/pr-<n>/storybook/; the production Storybook build is unchanged..nojekyllmarker is written on every deploy so branch-served Pages publishes the compiled assets verbatim (no Jekyll processing).gh-pagescontent approaches GitHub Pages' ~1GB limit.One-time repo setup (required)
gh-pages/(root). This system serves from the branch; the previous "GitHub Actions" source ignores the branch and 404s every preview.master'sfigma.ymlmust no longer runactions/deploy-pages, this PR needs to merge tomasterfor the setup to stay stable — until then, any push tomasterre-runs the old audit job and re-takes the Pages site.UI changes
No component/visual changes. The deliverable is the preview tooling itself — see the deployed preview links in the PR comment once the workflow runs.
Testing
How has it been tested?
Testing instructions
https://coinbase.github.io/cds/figma-audit/after amasterbuild, and that it does not disturb/or/pr-<n>/*.Preview deployment
Check to deploy previews for this PR. Leave unchecked to skip.
Illustrations/Icons Checklist
Not applicable — this PR does not change files under
packages/illustrations/**orpackages/icons/**.Change management
type=routine
risk=low
impact=sev5
automerge=false