Skip to content

ci: deploy the docs site through the shared pages workflow - #117

Merged
whatsaaaa merged 1 commit into
mainfrom
fm/fb-tmpl-pages
Nov 18, 2026
Merged

whatsaaaa merged 1 commit into
mainfrom
fm/fb-tmpl-pages

Conversation

@whatsaaaa

Copy link
Copy Markdown
Owner

Intent

Move the docs site's deploy onto the shared pages.yml workflow from whatsaaaa/template, as step 6 of moving form-builder onto the shared template. The site, its address, its triggers and its environment stay the same.

What changes

.github/workflows/docs.yml becomes .github/workflows/pages.yml (the name the Copier template renders) and calls whatsaaaa/template/.github/workflows/pages.yml@v1:

Before (docs.yml) After (pages.yml -> shared pages.yml@v1)
Triggers push to main on apps/docs/**, integration/examples/**, the workflow file; workflow_dispatch the same, kept in the caller (the path filter now names pages.yml)
Concurrency pages, never cancelled the same, kept in the caller
Checkout full history (fetch-depth: 0, for lastUpdated), no persisted credentials fetch-depth: 0 input; the shared job never persists credentials
Setup pnpm from packageManager, Node 24 with the pnpm cache, pnpm install --frozen-lockfile the shared setup action: the same steps and pinned action versions
Build configure-pages, pnpm docs:build configure-pages, pnpm run docs:build (build-script input)
Artifact apps/docs/.vitepress/dist the same (artifact-path input)
Deploy deploy-pages@v5.0.1 in the github-pages environment the same, inside the shared workflow
Permissions contents: read at the top; pages: write and id-token: write on deploy {} at the top; the calling job grants contents: read, pages: write, id-token: write, which the shared jobs split as before

The base path /form-builder/ lives in the VitePress config and is untouched, so the site still deploys to https://whatsaaaa.github.io/form-builder/. The shared workflow takes everything docs.yml did through its inputs; there is no gap to report.

Proof the build is the same

Nothing deploys from this pull request; the first deploy runs on merge to main, since apps/docs/** is not touched and the path filter names the new file. I built the site locally both ways, each in a fresh full-history clone, with the steps each workflow runs: pnpm install --frozen-lockfile then pnpm docs:build at main (c557b02), and pnpm install --frozen-lockfile then pnpm run "$BUILD_SCRIPT" with docs:build at this branch. I also built the old way a second time as a baseline, because VitePress builds are not byte-for-byte reproducible: code groups get random tab ids, so content-hashed asset names and minified identifiers change from run to run.

Build Files File list, asset hashes masked (sha256) Files, raw (sha256 of shasum list) Files, normalized (sha256)
old way, run 1 394 b5927759ae6092fe 4666e2ee597e114a cc4456152a2277d6
old way, run 2 394 b5927759ae6092fe 2adc88a7635ff87a 24ca0d4fd18678c6
new way 394 b5927759ae6092fe bcb44348749c4457 f48ef96b029fcec5
  • The file lists are identical once the 8-character content hashes in asset names are masked.
  • With the random code-group ids, asset-name hashes and the page hash map normalized, 389 of 394 files are byte-identical between the old and new ways. Two runs of the old way agree on fewer: 386.
  • The 5 files that still differ also differ between the two old-way runs: guide_getting-started.md and guide_typescript.md (each .js and .lean.js) differ only in minified single-letter identifier names, and the local search index holds the same 851 entries (same ids-to-URLs and stored fields, sha256 084bccdd62b704e9 in all three builds), numbered in a different order.
Normalization used
sed -E 's/(group|tab)-[A-Za-z0-9_-]{5,7}/\1-ID/g;
  s/\.[A-Za-z0-9_-]{8}\.(lean\.)?(js|css|woff2)/.HASH.\1\2/g;
  s/(\.md\\?"):\\?"[A-Za-z0-9_-]{8}/\1:"HASH/g'

Out of scope

The Copier retrofit, the docs content, CI and release. Both builds print esbuild's Unrecognized target environment "es2024" warning for the shared tsconfig; it is there on main already and is left for a separate change.

Before merging

The github-pages environment's branch policy must still allow main; the deploy job now runs from the shared workflow but in this repository's github-pages environment, as before.

@whatsaaaa
whatsaaaa merged commit ad9a0d9 into main Nov 18, 2026
13 checks passed
@whatsaaaa
whatsaaaa deleted the fm/fb-tmpl-pages branch November 18, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant