Commit 6811fd3
ci: broken-link check via linkinator
After pnpm build, stand up a throwaway static server on out/ and
crawl every internal link recursively. Any 404/anchor miss fails
the workflow.
- scripts/check-links.sh: serves out/ via python3 -m http.server,
waits for readiness, invokes linkinator. Wrapper exists because
linkinator's CLI rejects --server-root when combined with a URL
and can't resolve absolute hrefs (/en/api-reference etc.) against
a local file path without a server.
- package.json: adds linkinator devDep + `check-links` script so
devs can run the same check locally with `pnpm check-links`.
- deploy-dev.yml + deploy-prod.yml: add Check links step after
Build. Verified locally: 65 links scanned, all green.
External URLs are skipped — their drift is a third-party concern
that would fail CI on transient upstream outages.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent b04ee07 commit 6811fd3
5 files changed
Lines changed: 929 additions & 56 deletions
File tree
- .github/workflows
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
61 | 69 | | |
62 | 70 | | |
63 | 71 | | |
| |||
0 commit comments