-
Notifications
You must be signed in to change notification settings - Fork 708
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add markdown link checker action similar to link checker action in Ma…
…ssa docs (#4687) https://github.com/massalabs/docs/pull/157/files/d3499d290c95240b4720aea10c3e32a2bd20b903 Fixes: #3586 Co-authored-by: AurelienFT <[email protected]>
- Loading branch information
1 parent
af84432
commit 63ba310
Showing
2 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"ignorePatterns": [ | ||
{ | ||
"pattern": "(localhost|my\\.massa|discord\\.com)" | ||
}, | ||
{ | ||
"pattern": "^http://manpages.ubuntu.com" | ||
}, | ||
{ | ||
"pattern": "^https://test.massa.net/api/v2" | ||
}, | ||
{ | ||
"pattern": "^https://buildnet.massa.net/api/v2" | ||
} | ||
], | ||
"replacementPatterns": [ | ||
{ | ||
"pattern": "^/", | ||
"replacement": "https://docs.massa.net/" | ||
} | ||
], | ||
"timeout": "20s", | ||
"retryOn429": true, | ||
"retryCount": 5, | ||
"fallbackRetryDelay": "30s", | ||
"aliveStatusCodes": [ | ||
200, | ||
206, | ||
0 | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Check dead links | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
schedule: | ||
- cron: '0 10 * * 6' | ||
|
||
jobs: | ||
markdown-link-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '18' | ||
- name: Install markdown-link-check | ||
run: npm install -g markdown-link-check | ||
- name: Check links in markdown files | ||
run: | | ||
find . \( -name '*.md' -o -name '*.mdx' \) \ | ||
-exec markdown-link-check -v -c .github/workflows/config/link-check.json --progress {} \; 2>&1 | tee linkcheck.out | ||
grep -F -wc "[✖] |ERROR" ./linkcheck.out && exit 1 || true |