CI — Docs
Checks a repository's Markdown docs: relative links, links escaping the docs folder, external links of the pages a change touches, and VitePress-safe Markdown. Each check is a job with its own switch.
Usage
yaml
jobs:
docs:
uses: KevinDeBenedetti/github-workflows/.github/workflows/ci-docs.yml@main
permissions:
contents: read
with:
run-docs-link-check: true
run-docs-external-link-check: true
run-vitepress-check: trueInputs
| Input | Type | Default | Description |
|---|---|---|---|
run-link-check | boolean | true | Check markdown files for broken relative links (offline, no HTTP requests) |
link-check-paths | string | docs/**/*.md | Space-separated glob patterns of markdown files to check |
run-docs-link-check | boolean | false | Check that no relative links in docs/ escape the docs/ directory |
run-docs-external-link-check | boolean | false | Check the http(s) links of the docs/ markdown files changed by the push or pull request (lychee) |
run-vitepress-check | boolean | false | Check docs/ markdown for unescaped Vue interpolations that break the VitePress SSR build |
docs-directory | string | docs | Path to the docs folder checked by docs-link-check, docs-external-link-check and vitepress-check |
runner | string | '"ubuntu-26.04"' | Runner labels as JSON — e.g. '"ubuntu-26.04"' or '"ubicloud-standard-2"' |
Jobs
| Job | Condition |
|---|---|
link-check | run-link-check: true |
docs-link-check | run-docs-link-check: true |
docs-external-link-check | run-docs-external-link-check: true |
vitepress-check | run-vitepress-check: true |
Notes
link-checkruns lychee in offline mode — no external HTTP requests are made. Markdown without any link passes.docs-link-checkuses thecheck-docs-linksaction.docs-external-link-checkuses thecheck-docs-external-linksaction — lychee online, on thedocs/files the push or pull request changed only, with github.com links checked through the job token.vitepress-checkuses thecheck-vitepress-mdaction — guards against{{ }}interpolations that crash the VitePress SSR build (see cd-docs).- No job needs a secret: the checkouts take no submodule.
- Every job is cut off after 15 minutes.
ci-shellandci-nodecarried these checks before. Their inputs of the same names still work, with a warning, until the next breaking release: move thewith:keys to a call of this workflow.