-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (73 loc) · 2.18 KB
/
Copy pathdocs.yml
File metadata and controls
82 lines (73 loc) · 2.18 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Documentation
on:
push:
branches: [main]
paths:
- "**.md"
- "docs/**"
- ".github/workflows/docs.yml"
pull_request:
branches: [main]
paths:
- "**.md"
- "docs/**"
- ".github/workflows/docs.yml"
jobs:
docs-check:
runs-on: ubuntu-latest
strategy:
matrix:
task: [lint, spell, structure]
name: Docs Check - ${{ matrix.task }}
steps:
- uses: actions/checkout@v4
- name: Run ${{ matrix.task }} check
run: |
case "${{ matrix.task }}" in
lint)
npx markdownlint-cli2 "**/*.md" "!CHANGELOG.md" "!**/.venv/**" "!**/.venv*/**" "!**/.VENV-*/**" --config .markdownlint.json
npx markdown-link-check -q -v -c .github/markdown-link-check.config.json README.md
;;
spell)
npx cspell "**/*.md" --config .github/cspell.config.yaml
;;
structure)
missing=0
files=(
"README.md"
"CONTRIBUTING.md"
"LICENSE"
"SECURITY.md"
"CODE_OF_CONDUCT.md"
"CHANGELOG.md"
"FAQ.md"
"ROADMAP.md"
"KNOWN_ISSUES.md"
)
for file in "${files[@]}"; do
if [ ! -f "$file" ]; then
echo "Missing required file: $file"
missing=1
else
echo "Found: $file"
fi
done
templates=(
".github/ISSUE_TEMPLATE/bug_report.md"
".github/ISSUE_TEMPLATE/feature_request.md"
".github/pull_request_template.md"
)
for template in "${templates[@]}"; do
if [ ! -f "$template" ]; then
echo "Missing template: $template"
missing=1
else
echo "Found: $template"
fi
done
if [ "$missing" -eq 1 ]; then
exit 1
fi
echo "All required documentation files present"
;;
esac