ci(docs): wire test-urls.js into CI to catch broken doc links (#6333)#8686
Open
Metbcy wants to merge 1 commit into
Open
ci(docs): wire test-urls.js into CI to catch broken doc links (#6333)#8686Metbcy wants to merge 1 commit into
Metbcy wants to merge 1 commit into
Conversation
Builds on the existing packages/docs/test-urls.js helper by: - Switching it from flaky live HEAD requests to github.com over to a deterministic local filesystem check against packages/docs/src/routes (the false-positive previously reported on /docs/routing was a transient network error, not a real broken link). - Making the script exit non-zero on any broken link so CI fails loudly when a docs page is moved/renamed without updating on-this-page.tsx. - Adding a 'test.urls' script in packages/docs/package.json. - Adding a 'Check Docs Links' step in .github/workflows/ci.yml (Build Docs job) that runs the script before pnpm build.packages.docs. Closes QwikDev#6333
|
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.
Closes #6333.
Per @wmertens in the issue thread ("We have packages/docs/test-urls.js now but we need to put it into CI"), this PR wires the existing helper into CI. It also hardens the script to be CI-safe.
Changes
packages/docs/test-urls.js— rewrote to walk the local docs filesystem (deterministic, no flaky network HEAD requests). Exits non-zero on broken links so CI fails loudly.packages/docs/package.json— adds"test.urls": "node test-urls.js"..github/workflows/ci.yml— adds aCheck Docs Links (issue #6333)step in theBuild Docsjob.Verification
node packages/docs/test-urls.js→ 41/41 pass, exit 0 locally./docs/routingfailure in the old script was a transientgithub.comHEAD-request error; the target filepackages/docs/src/routes/docs/(qwikcity)/routing/index.mdxexists.