Repository navigation
ci: deploy the docs site through the shared pages workflow - #117
Merged
Merged
Conversation
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.
Intent
Move the docs site's deploy onto the shared
pages.ymlworkflow fromwhatsaaaa/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.ymlbecomes.github/workflows/pages.yml(the name the Copier template renders) and callswhatsaaaa/template/.github/workflows/pages.yml@v1:docs.yml)pages.yml-> sharedpages.yml@v1)mainonapps/docs/**,integration/examples/**, the workflow file;workflow_dispatchpages.yml)pages, never cancelledfetch-depth: 0, forlastUpdated), no persisted credentialsfetch-depth: 0input; the shared job never persists credentialspackageManager, Node 24 with the pnpm cache,pnpm install --frozen-lockfileconfigure-pages,pnpm docs:buildconfigure-pages,pnpm run docs:build(build-scriptinput)apps/docs/.vitepress/distartifact-pathinput)deploy-pages@v5.0.1in thegithub-pagesenvironmentcontents: readat the top;pages: writeandid-token: writeon deploy{}at the top; the calling job grantscontents: read,pages: write,id-token: write, which the shared jobs split as beforeThe 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 everythingdocs.ymldid 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, sinceapps/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-lockfilethenpnpm docs:buildatmain(c557b02), andpnpm install --frozen-lockfilethenpnpm run "$BUILD_SCRIPT"withdocs:buildat 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.shasumlist)b5927759ae6092fe4666e2ee597e114acc4456152a2277d6b5927759ae6092fe2adc88a7635ff87a24ca0d4fd18678c6b5927759ae6092febcb44348749c4457f48ef96b029fcec5guide_getting-started.mdandguide_typescript.md(each.jsand.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, sha256084bccdd62b704e9in all three builds), numbered in a different order.Normalization used
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 onmainalready and is left for a separate change.Before merging
The
github-pagesenvironment's branch policy must still allowmain; the deploy job now runs from the shared workflow but in this repository'sgithub-pagesenvironment, as before.