Add CI: typecheck + relative-href sanity check#4
Merged
BGebken merged 1 commit intofix/broken-footer-doc-linksfrom Apr 29, 2026
Merged
Add CI: typecheck + relative-href sanity check#4BGebken merged 1 commit intofix/broken-footer-doc-linksfrom
BGebken merged 1 commit intofix/broken-footer-doc-linksfrom
Conversation
Previously the deploy workflow ran only `npm run build` and pushed the output straight to Pages. Type errors and broken relative href values (like the footer docs links fixed in #3) could only be caught in production. - Add `typecheck` script (`tsc --noEmit`) and `typescript` + `@types/*` dev deps. - Split workflow into `verify` (runs on push + PR) and `deploy` (runs only on push to main). Deploy now depends on verify passing. - verify runs: npm ci → typecheck → href sanity check → build. - The href check greps src/ for any `href="..."` whose value doesn't start with http(s):, mailto:, tel:, #, or /. This catches the exact class of bug where a relative path like "docs/foo.md" was shipped to a site that doesn't host those files. Note: lychee/link-checkers weren't appropriate here — the site is a Vite SPA, so hrefs live in the JS bundle, not in the built HTML. Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
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
verifyjob that runs on every PR and push to main:typecheck→ href sanity check → build.deploynow depends onverifypassing, so a broken build can't ship to Pages.typescript,@types/react,@types/react-dom,@types/nodeas dev deps (project had atsconfig.jsonbut no compiler installed).href="..."insrc/whose value doesn't start withhttp(s)://,mailto:,tel:,#, or/. Would have caught the 13 broken footer links fixed in Fix broken footer doc links (argus.huntridgelabs.com/docs/*.md 404s) #3.Why grep, not a link checker?
The site is a Vite SPA — hrefs live in the JS bundle after build, not in the built HTML, so tools like
lycheethat scandist/**/*.htmlwouldn't see them. A source-level regex is the lowest-friction catch for this specific class of bug.PR base
This PR is targeted at
fix/broken-footer-doc-links(#3) so its own CI run passes. Once #3 merges, GitHub will auto-retarget this PR tomain.Test plan
verifyjob runs on this PR and passeshref="test.md") to confirm the check failsdeploystill runs successfully on push to main🤖 Generated with Claude Code