Skip to content

Commit 2333a6e

Browse files
ihabadhamclaude
andcommitted
Add GitHub Action for automated markdown link checking
Implements automated link checking to prevent broken documentation links. Uses markdown-link-check action that runs on: - Push to master (when .md files change) - Pull requests (when .md files change) - Weekly schedule (Mondays at 8am UTC) - Manual workflow dispatch Includes configuration to: - Ignore localhost and mailto links - Handle GitHub relative links properly - Retry on rate limiting - Check all markdown files in docs/ folder This addresses the need for automated 404 detection in documentation as requested by Justin. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent d0b221f commit 2333a6e

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"ignorePatterns": [
3+
{
4+
"pattern": "^http://localhost"
5+
},
6+
{
7+
"pattern": "^https://localhost"
8+
},
9+
{
10+
"pattern": "^mailto:"
11+
}
12+
],
13+
"replacementPatterns": [
14+
{
15+
"pattern": "^/",
16+
"replacement": "https://github.com/shakacode/react_on_rails/blob/master/"
17+
}
18+
],
19+
"httpHeaders": [
20+
{
21+
"urls": ["https://docs.github.com", "https://github.com"],
22+
"headers": {
23+
"Accept": "text/html"
24+
}
25+
}
26+
],
27+
"timeout": "20s",
28+
"retryOn429": true,
29+
"retryCount": 3,
30+
"fallbackRetryDelay": "30s",
31+
"aliveStatusCodes": [200, 206]
32+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Check Markdown Links
2+
3+
on:
4+
push:
5+
branches: [master]
6+
paths:
7+
- '**.md'
8+
- '.github/workflows/check-markdown-links.yml'
9+
pull_request:
10+
paths:
11+
- '**.md'
12+
- '.github/workflows/check-markdown-links.yml'
13+
schedule:
14+
# Run weekly on Monday at 8am UTC
15+
- cron: '0 8 * * 1'
16+
workflow_dispatch:
17+
18+
jobs:
19+
markdown-link-check:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Check markdown links
25+
uses: gaurav-nelson/github-action-markdown-link-check@v1
26+
with:
27+
use-quiet-mode: 'yes'
28+
use-verbose-mode: 'no'
29+
config-file: '.github/markdown-link-check-config.json'
30+
folder-path: 'docs/'
31+
file-extension: '.md'
32+
max-depth: -1
33+
check-modified-files-only: 'no'
34+
base-branch: 'master'

0 commit comments

Comments
 (0)