ci(link-checker): use lychee instead of MLC #34
Merged
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.
This PR changes
mdbook-docs.yml
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
) closely mirrors the settings from existingmlc.mdbook.json
, and thus should work with any and all Markdown files. I opted to leavemlc.next.json
as-is for now, because it uses extra configuration.Reasoning for the change:
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 bylychee-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):lychee
can use GHA cache to avoid checking the same links on repeated CI runs - this is configured in this PR