Repository navigation
chore(ci): build and validate the deploy site in one pass - #75
Merged
Merged
Conversation
The deploy job ran `just validate` (which itself performs a live data sync and builds the site), then re-fetched every release and documentation record, then rebuilt the site just to apply the deployment base: three data syncs and two builds for one artifact, with nothing in between that could invalidate the first result. Measured on a successful run, that is 410s of validation + 196s of sync + 21s of build out of a 667s build job. deploy.yml now resolves the Pages base and site URL *before* validation and puts them in that step environment, so the build `just validate` performs is the artifact that ships and the link, SEO and dist checks see the URLs the deployment actually serves. The explicit live sync and the second build are removed. `just build` now depends on `data-sync` (cache-first) instead of `live-data-sync`, so the build inside `just validate` reuses the release data and the docs mirror the earlier `typecheck` sync already produced, instead of re-fetching and re-aggregating them. A fresh checkout still fetches live (there is no cache), and `just live-data-sync` forces a refresh. README and the site-validation-loop skill follow the recipes again.
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.
Why
The deploy job did the same work three times for one artifact:
Run validation(just validate— which itself syncs live and builds)Refresh live release and documentation data(DATA_MODE=live bun run data:sync)Build site with live data(bun run build)The second and third steps re-created what the first had just produced, with nothing in between that could invalidate it.
just validatewas also syncing twice internally:typecheckruns a data sync, andbuilddepended onlive-data-sync. A second live fetch bumps the release cacheretrievedAt, which makes the docs mirror written moments earlier stale by definition (isMirrorManifestCurrent), so every documentation page was re-aggregated a second time as well.What changed
deploy.ymlresolves the Pages base and site URL before validation and puts them in that step environment, so the buildjust validateperforms is the artifact that ships and the link, SEO and dist checks run against the URLs the deployment actually serves. The second build only ever existed to apply the base; the explicit live sync is gone with it.just builddepends ondata-sync(cache-first) instead oflive-data-sync, so the build insidejust validatereuses the release data and docs mirror the earlier sync produced. A fresh checkout still fetches live (there is no cache), andjust live-data-syncforces a refresh.skills/site-validation-loopfollow the recipes again.Evidence
just validatelocally end-to-end with a warm cache (the pre-push hook): 45s, reportingReleases: using existing cache./Docs: using existing mirror., with the Astro build at 18s and 366 pages. The same chain previously synced and aggregated twice.Expected CI effect: the deploy build job drops the duplicate sync and build (~217s of 667s) and
just validatedrops its second live sync and re-aggregation (~190s of 410s) — roughly 60% off the job.No publishing behaviour changes: the data is still fetched live on every deploy, by
just validateitself.