Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(link-checker): use lychee instead of MLC (#34)
This PR changes [`mdbook-docs.yml`](../blob/master/.github/workflows/mdbook-docs.yml#L35) workflow to use https://github.com/lycheeverse/lychee ("Fast, async, stream-based link checker written in Rust") via https://github.com/lycheeverse/lychee-action instead of MLC (`markdown-link-check`). The lychee config file ([`lychee.toml`](../blob/lychee-link-checker/docs-hub/lychee.toml)) closely mirrors the settings from existing [`mlc.mdbook.json`](../blob/master/docs-hub/mlc.mdbook.json), and thus should work with any and all Markdown files. I opted to leave `mlc.next.json` as-is for now, because it uses extra configuration. Reasoning for the change: - main reason - `markdown-link-check` operates on individual files (e.g., `find . -name *md -exec markdown-link-check {};`). This means that the errors are reported in the middle of the job output, which is quite long. Thus, it is difficult to find the actual error message. `lychee` uses globs like `**/*.md` natively (handled by `lychee-action` under the hood), meaning that there's a single report for all links in the repo's Markdown, with errors clearly visible. It looks like this by default (1 link failing on purpose): ``` 179/179 ━━━━━━━━━━━━━━━━━━━━ Finished extracting links Issues found in 1 input. Find details below. [docs/src/connecting/external-node.md]: ✗ [403] https://faucet-beta-5.fuel.network/ | Failed: Network error: Forbidden 🔍 179 Total (in 1s) ✅ 177 OK 🚫 1 Error 💤 1 Excluded ``` - `lychee` can use GHA cache to avoid checking the same links on repeated CI runs - this is configured in this PR - it's much faster than MLC, written in Rust and well-maintained (+ for security)
- Loading branch information