-
-
Notifications
You must be signed in to change notification settings - Fork 638
Add automated markdown link checking GitHub Action #1800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
a2970b1
1fdda76
c6fad48
7a6fb6d
dba84c9
bff4ab7
c6293cf
30c931b
ea30632
b286f82
c671785
a6102e0
1545d37
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| { | ||
| "ignorePatterns": [ | ||
| { | ||
| "pattern": "^http://localhost" | ||
| }, | ||
| { | ||
| "pattern": "^https://localhost" | ||
| }, | ||
| { | ||
| "pattern": "^mailto:" | ||
| } | ||
| ], | ||
| "replacementPatterns": [ | ||
| { | ||
| "pattern": "^/", | ||
| "replacement": "https://github.com/shakacode/react_on_rails/blob/master/" | ||
| } | ||
| ], | ||
| "httpHeaders": [ | ||
| { | ||
| "urls": ["https://docs.github.com", "https://github.com"], | ||
| "headers": { | ||
| "Accept": "text/html" | ||
| } | ||
| } | ||
| ], | ||
| "timeout": "20s", | ||
| "retryOn429": true, | ||
| "retryCount": 3, | ||
| "fallbackRetryDelay": "30s", | ||
| "aliveStatusCodes": [200, 206] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| name: Check Markdown Links | ||
|
|
||
| on: | ||
| push: | ||
| branches: [master] | ||
| paths: | ||
| - '**.md' | ||
| - '.github/workflows/check-markdown-links.yml' | ||
| pull_request: | ||
| paths: | ||
| - '**.md' | ||
| - '.github/workflows/check-markdown-links.yml' | ||
| schedule: | ||
| # Run weekly on Monday at 8am UTC | ||
| - cron: '0 8 * * 1' | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| markdown-link-check: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Check markdown links | ||
| uses: gaurav-nelson/github-action-markdown-link-check@v1 | ||
|
||
| with: | ||
| use-quiet-mode: 'yes' | ||
| use-verbose-mode: 'no' | ||
| config-file: '.github/markdown-link-check-config.json' | ||
| folder-path: 'docs/' | ||
| file-extension: '.md' | ||
| max-depth: -1 | ||
| check-modified-files-only: 'no' | ||
| base-branch: 'master' | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The config file
.github/markdown-link-check-config.jsonshould be included as well, since changing it can affect whether the check passes. I initially thought this file shouldn't be included, but the options starting on line 26 do matter.