docs: update documentation for recent merged PRs #277
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Lints the documentation source in docs/**: markdownlint for style, | |
| # lychee (offline) to verify that every relative Markdown link resolves | |
| # to a real file, and a semantic check of the generated /llms.txt | |
| # (https://llmstxt.org/) against its data/nav.yml source of truth. | |
| # Portable relative links are what the Hugo module mount on | |
| # docs.docker.com resolves, so broken ones would break the downstream | |
| # build (see docs-upstream.yml). | |
| name: docs-lint | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - ".github/workflows/docs-lint.yml" | |
| - "docs/**" | |
| - "scripts/docs-check-canonical.sh" | |
| - "scripts/docs-check-llms-txt.sh" | |
| pull_request: | |
| paths: | |
| - ".github/workflows/docs-lint.yml" | |
| - "docs/**" | |
| - "scripts/docs-check-canonical.sh" | |
| - "scripts/docs-check-llms-txt.sh" | |
| env: | |
| # Kept in sync with docs-deploy.yml / docs-a11y.yml so every docs | |
| # workflow builds with the same Hugo release. | |
| HUGO_VERSION: 0.163.0 | |
| jobs: | |
| markdownlint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| # Run from docs/ so the globs and ignores in .markdownlint-cli2.yaml | |
| # resolve the same way as a local `npx markdownlint-cli2` run. | |
| - name: Lint Markdown | |
| run: npx --yes markdownlint-cli2@0.22.1 | |
| working-directory: docs | |
| canonical-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| # Mounted pages must canonicalize to their docs.docker.com URL | |
| # (STYLE.md "Canonical URLs"); catches pages added without one. | |
| - name: Check canonical front matter | |
| run: ./scripts/docs-check-canonical.sh | |
| link-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - name: Check relative links | |
| uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0 | |
| with: | |
| # Verbatim (code block) links are excluded by lychee's defaults. | |
| # index.md and 404.md are github.io-only landing pages whose | |
| # links are HTML anchors resolved on the rendered site; the | |
| # muffet check (task docs-check-links) covers them. | |
| args: >- | |
| --offline --no-progress | |
| --exclude-path docs/index.md --exclude-path docs/404.md | |
| "docs/**/*.md" | |
| fail: true | |
| llms-txt-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - name: Install Hugo | |
| run: | | |
| curl -fsSL "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz" \ | |
| | sudo tar -xz -C /usr/local/bin hugo | |
| hugo version | |
| # llms.txt is generated at build time from data/nav.yml (STYLE.md | |
| # "llms.txt"); a broken groups[].items traversal or similar template | |
| # regression can silently drop entries while the build stays green, | |
| # so this asserts the built output's content, not just build success. | |
| - name: Check llms.txt | |
| run: ./scripts/docs-check-llms-txt.sh |