-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocs-check.yml
More file actions
36 lines (31 loc) · 1.33 KB
/
Copy pathdocs-check.yml
File metadata and controls
36 lines (31 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Example GitHub Actions workflow: fail the build when docs rot.
#
# Drop this in your repo at .github/workflows/docs-check.yml. It runs on every push and PR
# that touches Markdown and calls examples/check-docs.sh, which runs the whole linter suite:
# links + anchors, code fences, image alt text, frontmatter, and list consistency by default;
# heading structure, table alignment, and marker-based TOCs opt-in (see the toggles below).
#
# The example assumes the linter scripts sit at the repo root alongside examples/check-docs.sh.
# If you keep them elsewhere, set SCRIPTS_DIR in the run step.
name: docs-check
on:
push:
paths: ['**.md', '**.markdown']
pull_request:
paths: ['**.md', '**.markdown']
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
# Runs the docs linter suite across every tracked Markdown file.
# Opt-in extras via env:
# CHECK_HEADINGS=1 also lint heading structure (duplicate anchors, skipped levels)
# CHECK_TABLES=1 also require GFM tables to be aligned
# TOC_FILES="README.md docs/guide.md" also verify <!-- TOC --> blocks
# Any default check can be turned off, e.g. CHECK_ALT=0.
- name: Check Markdown docs
run: bash examples/check-docs.sh