Skip to content

Commit d2baeed

Browse files
ironicbadgerclaude
andcommitted
Add GitHub Actions workflows for quality checks
- Add markdown linting workflow that runs on PRs and blocks merging if issues found - Add dead link checker with weekly schedule and PR triggers - Add MkDocs build validation to ensure documentation builds correctly - Configure markdownlint rules appropriate for MkDocs Material sites These workflows enforce documentation quality standards and catch broken links automatically. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 5cba7f9 commit d2baeed

File tree

4 files changed

+251
-0
lines changed

4 files changed

+251
-0
lines changed

.github/workflows/check-links.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Check for Dead Links
2+
3+
on:
4+
schedule:
5+
# Run every Sunday at 2 AM UTC
6+
- cron: '0 2 * * 0'
7+
workflow_dispatch:
8+
pull_request:
9+
paths:
10+
- '**.md'
11+
- 'mkdocs.yml'
12+
13+
jobs:
14+
link-check:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Link Checker
21+
uses: lycheeverse/lychee-action@v2
22+
with:
23+
# Check all markdown files
24+
args: >
25+
--verbose
26+
--no-progress
27+
--accept=200,201,202,203,204,301,302,303,307,308
28+
--timeout 20
29+
--max-retries 3
30+
--user-agent "Mozilla/5.0 (compatible; pms-wiki-link-checker)"
31+
--exclude-private
32+
--exclude "^(?i:mailto)"
33+
--exclude "^(?i:javascript)"
34+
--exclude "github.com/.*/edit/"
35+
--exclude "github.com/.*/blob/"
36+
--exclude "localhost"
37+
--exclude "127.0.0.1"
38+
--exclude "example.com"
39+
--exclude "example.org"
40+
--exclude "plausible.ktz.cloud"
41+
--exclude "techhub.social"
42+
--exclude-path node_modules/
43+
--exclude-path .git/
44+
'**/*.md'
45+
fail: true
46+
format: markdown
47+
output: ./lychee-report.md
48+
jobSummary: true
49+
50+
- name: Upload link check report
51+
if: failure()
52+
uses: actions/upload-artifact@v4
53+
with:
54+
name: link-check-report
55+
path: lychee-report.md
56+
57+
- name: Create issue from failed link check
58+
if: failure() && github.event_name == 'schedule'
59+
uses: peter-evans/create-issue-from-file@v5
60+
with:
61+
title: "Broken links detected in documentation"
62+
content-filepath: ./lychee-report.md
63+
labels: |
64+
documentation
65+
broken-links
66+
automated

.github/workflows/lint.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Markdown Linting
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '**.md'
7+
- '.markdownlint.yml'
8+
- '.github/workflows/lint.yml'
9+
push:
10+
branches:
11+
- main
12+
paths:
13+
- '**.md'
14+
- '.markdownlint.yml'
15+
- '.github/workflows/lint.yml'
16+
17+
jobs:
18+
lint:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: '20'
28+
29+
- name: Install markdownlint-cli2
30+
run: npm install -g markdownlint-cli2
31+
32+
- name: Run markdownlint
33+
run: markdownlint-cli2 "**/*.md" "#node_modules"
34+
35+
- name: Check for markdown issues
36+
if: failure()
37+
run: |
38+
echo "::error::Markdown linting failed. Please fix the issues above before merging."
39+
exit 1
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Validate MkDocs Build
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'docs/**'
7+
- 'overrides/**'
8+
- 'mkdocs.yml'
9+
- 'requirements.txt'
10+
- '.github/workflows/validate-build.yml'
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: '3.x'
23+
24+
- name: Cache pip packages
25+
uses: actions/cache@v4
26+
with:
27+
path: ~/.cache/pip
28+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/mkdocs.yml') }}
29+
restore-keys: |
30+
${{ runner.os }}-pip-
31+
32+
- name: Install MkDocs and dependencies
33+
run: |
34+
pip install --upgrade pip
35+
pip install mkdocs-material
36+
pip install mkdocs-material[imaging]
37+
pip install mkdocs-minify-plugin
38+
pip install mkdocs-git-revision-date-plugin
39+
pip install mkdocs-material-plausible-plugin
40+
pip install pillow cairosvg
41+
42+
- name: Build MkDocs site
43+
run: mkdocs build --strict --verbose
44+
45+
- name: Check for build warnings
46+
run: |
47+
mkdocs build --strict 2>&1 | tee build.log
48+
if grep -q "WARNING" build.log; then
49+
echo "::warning::Build completed with warnings. Please review the output above."
50+
fi
51+
52+
- name: Upload build artifacts
53+
if: always()
54+
uses: actions/upload-artifact@v4
55+
with:
56+
name: mkdocs-build-site
57+
path: site/
58+
retention-days: 7

.markdownlint.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Markdownlint configuration for PMS Wiki
2+
# https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md
3+
4+
# Default state for all rules
5+
default: true
6+
7+
# Line length
8+
MD013:
9+
# Allow long lines for tables and code blocks
10+
line_length: 120
11+
tables: false
12+
code_blocks: false
13+
14+
# Inline HTML - disabled as MkDocs Material uses HTML
15+
MD033:
16+
allowed_elements:
17+
- div
18+
- span
19+
- br
20+
- p
21+
- a
22+
- img
23+
- details
24+
- summary
25+
- kbd
26+
- sup
27+
- sub
28+
- figure
29+
- figcaption
30+
31+
# First line in file should be a top-level heading
32+
MD041: false
33+
34+
# Duplicate heading - disabled for docs that may repeat headings
35+
MD024: false
36+
37+
# Multiple headings with the same content - disabled for consistency
38+
MD025: false
39+
40+
# Trailing punctuation in heading
41+
MD026:
42+
punctuation: ".,;:!"
43+
44+
# Lists should be surrounded by blank lines
45+
MD032: true
46+
47+
# Code block style
48+
MD046:
49+
style: fenced
50+
51+
# Emphasis style
52+
MD049:
53+
style: underscore
54+
55+
# Strong style
56+
MD050:
57+
style: asterisk
58+
59+
# Link and image style
60+
MD054:
61+
link_image_style: collapsed
62+
link_image_collapse_single_space: true
63+
64+
# Table pipe style
65+
MD055:
66+
style: leading_and_trailing
67+
68+
# Table row style
69+
MD056: true
70+
71+
# Dollar signs used before commands without showing output
72+
MD014: false
73+
74+
# No bare URLs - disabled as some docs use them intentionally
75+
MD034: false
76+
77+
# Horizontal rules style
78+
MD035:
79+
style: "---"
80+
81+
# No inline HTML - disabled for MkDocs Material
82+
MD033: false
83+
84+
# First line should be a heading - disabled for included files
85+
MD041: false
86+
87+
# Require code fence language - disabled as not always needed
88+
MD040: false

0 commit comments

Comments
 (0)