Skip to content

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: true

Inputs ​

InputTypeDefaultDescription
run-link-checkbooleantrueCheck markdown files for broken relative links (offline, no HTTP requests)
link-check-pathsstringdocs/**/*.mdSpace-separated glob patterns of markdown files to check
run-docs-link-checkbooleanfalseCheck that no relative links in docs/ escape the docs/ directory
run-docs-external-link-checkbooleanfalseCheck the http(s) links of the docs/ markdown files changed by the push or pull request (lychee)
run-vitepress-checkbooleanfalseCheck docs/ markdown for unescaped Vue interpolations that break the VitePress SSR build
docs-directorystringdocsPath to the docs folder checked by docs-link-check, docs-external-link-check and vitepress-check
runnerstring'"ubuntu-26.04"'Runner labels as JSON — e.g. '"ubuntu-26.04"' or '"ubicloud-standard-2"'

Jobs ​

JobCondition
link-checkrun-link-check: true
docs-link-checkrun-docs-link-check: true
docs-external-link-checkrun-docs-external-link-check: true
vitepress-checkrun-vitepress-check: true

Notes ​

  • link-check runs lychee in offline mode — no external HTTP requests are made. Markdown without any link passes.
  • docs-link-check uses the check-docs-links action.
  • docs-external-link-check uses the check-docs-external-links action — lychee online, on the docs/ files the push or pull request changed only, with github.com links checked through the job token.
  • vitepress-check uses the check-vitepress-md action — 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-shell and ci-node carried these checks before. Their inputs of the same names still work, with a warning, until the next breaking release: move the with: keys to a call of this workflow.