Fix: build the generated pages in CI, and fail when they fall back - #3
Merged
Merged
Conversation
The development and changelog pages are generated from the application repository at build time. CI had no checkout of it, so both rendered their fallback link and every check passed against a site two pages short of the real one. The changelog page was 171 characters instead of 36,646. CI now clones the application repository and points STACKYARD_REPO at it. The check script fails when either page ships its fallback, so the condition cannot return unnoticed.
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.
Summary
STACKYARD_REPO, so thedevelopment and changelog pages are generated from real content rather than
rendering their fallback link.
scripts/check-dist.mjsgains agenpagecheck that fails when either pageships its fallback, so the condition cannot return unnoticed.
Without the checkout,
/docs/changelog/built to 171 characters instead of36,646, and
/docs/development/to 647 instead of 3,874. Every existing checkpassed against that, because a fallback page is still a valid page with working
links.
The clone is unauthenticated: the application repository is public, and only its
CONTRIBUTING.mdandCHANGELOG.mdare read.Testing
npm run buildandnpm run checkpass with the repository present. Verifiedthe new gate by building with
STACKYARD_REPO=/nonexistent: both pages werereported and the run failed. Building normally restored a pass.
Checklist
npm run buildandnpm run checkboth pass.