Skip to content

Commit f6c7cf1

Browse files
KingPinKingPin
authored andcommitted
ci: add lightweight docs workflow with markdown linting and link checking
1 parent 1e99d88 commit f6c7cf1

3 files changed

Lines changed: 109 additions & 0 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"ignorePatterns": [
3+
{
4+
"pattern": "^https://github.com/.*/pull/new/"
5+
},
6+
{
7+
"pattern": "^http://localhost"
8+
},
9+
{
10+
"pattern": "^https://sumguy.com"
11+
}
12+
],
13+
"timeout": "20s",
14+
"retryOn429": true,
15+
"retryCount": 3,
16+
"aliveStatusCodes": [200, 206]
17+
}

.github/workflows/docs-ci.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Documentation CI
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
paths:
8+
- '**.md'
9+
- 'docs/**'
10+
pull_request:
11+
branches:
12+
- '**'
13+
paths:
14+
- '**.md'
15+
- 'docs/**'
16+
workflow_dispatch:
17+
18+
concurrency:
19+
group: docs-ci-${{ github.ref }}
20+
cancel-in-progress: true
21+
22+
jobs:
23+
markdown-lint:
24+
runs-on: ubuntu-latest
25+
name: Markdown Lint
26+
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
31+
- name: Lint Markdown files
32+
uses: DavidAnson/markdownlint-cli2-action@v16
33+
with:
34+
globs: |
35+
**/*.md
36+
!node_modules
37+
!.github
38+
39+
- name: Summary
40+
run: |
41+
echo "✅ Markdown linting passed"
42+
43+
link-checker:
44+
runs-on: ubuntu-latest
45+
name: Check Links
46+
47+
steps:
48+
- name: Checkout
49+
uses: actions/checkout@v4
50+
51+
- name: Check links in markdown files
52+
uses: gaurav-nelson/github-action-markdown-link-check@v1
53+
with:
54+
use-quiet-mode: 'yes'
55+
config-file: '.github/markdown-link-check-config.json'
56+
check-modified-files-only: 'yes'
57+
base-branch: 'main'
58+
59+
- name: Summary
60+
if: success()
61+
run: |
62+
echo "✅ Link checking passed"
63+
64+
docs-summary:
65+
runs-on: ubuntu-latest
66+
name: Docs CI Summary
67+
needs: [markdown-lint, link-checker]
68+
if: always()
69+
70+
steps:
71+
- name: Check job results
72+
run: |
73+
if [ "${{ needs.markdown-lint.result }}" = "success" ] && [ "${{ needs.link-checker.result }}" = "success" ]; then
74+
echo "✅ All documentation checks passed"
75+
exit 0
76+
elif [ "${{ needs.link-checker.result }}" = "failure" ]; then
77+
echo "⚠️ Link checker failed (non-blocking)"
78+
exit 0
79+
else
80+
echo "❌ Documentation checks failed"
81+
exit 1
82+
fi

.markdownlint.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"default": true,
3+
"MD013": false,
4+
"MD033": false,
5+
"MD041": false,
6+
"MD022": false,
7+
"MD032": false,
8+
"MD040": false,
9+
"MD031": false
10+
}

0 commit comments

Comments
 (0)