Repository navigation
Add reference-only build and pre-built data.json input for PR previews - #1629
Open
Vaivaswat2244 wants to merge 4 commits into
Open
Vaivaswat2244 wants to merge 4 commits into
Vaivaswat2244 wants to merge 4 commits into
Conversation
Vaivaswat2244
requested review from
coseeian,
davepagurek,
limzykenneth and
perminder-17
October 23, 2026 01:47
Vaivaswat2244
force-pushed
the
feat/reference-only-build
branch
from
October 23, 2026 01:50
ed1ed88 to
94bee64
Compare
This branch has not been deployed
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.
First of the PRs for the reference previews discussed in processing/p5.js#9303: this adds just the build capability the preview workflow will use. Nothing here changes the normal build or deploy; both additions are opt-in via environment variables.
P5_DATA_JSON_PATH=<file> npm run build:referenceuses a pre-built YUIDocdata.jsoninstead of cloning p5.js and running its docs build, so CI can hand over the artifact a p5.js PR build already produced.npm run build:reference-onlybuilds only the English/reference/**pages; everything else 404s.REFERENCE_SKIP_LOWERCASE=1additionally skips the lowercase alias of each reference route, roughly halving the page count.Timings from a run on
ubuntu-latest: the reference-only build takes 2m50s against ~17m for the full site, producingdata.jsonin a p5.js checkout takes 41s, andbuild:referencefrom that file takes 4s. Locally, the MDX output fromP5_DATA_JSON_PATHis byte-identical (905/905 files) to the clone path for p5.js v2.3.3, the normal full build is unchanged, and an interrupted reference-only build restoressrc/pages.Known coupling: reference pages still load the
pages,top-banner,banner, andui/*.yamlcollections through their layouts, which this PR deliberately leaves alone.Next up, in a follow-up PR: the workflow that receives a dispatch from p5.js CI, runs this build, and deploys a preview to Cloudflare.
cc @limzykenneth @ksen0