Skip to content

Commit

Permalink
added link checking
Browse files Browse the repository at this point in the history
  • Loading branch information
kyleoconnell-NIH committed Dec 5, 2023
1 parent 30c3d15 commit 2e27e32
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/check_links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Check Links

on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
jobs:
check-links:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16

- name: Install dependencies
run: |
npm install -g markdown-link-check
- name: Check links in Markdown files
run: find . -name '*.md' -print0 | xargs -0 -n1 markdown-link-check -q -c .markdown-link-check.json
26 changes: 26 additions & 0 deletions .markdown-link-check.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"ignorePatterns": [
{
"pattern": "^#"
},
{
"pattern": "^https://iam.nih.gov"
}
],
"replacementPatterns": [
{
"pattern": "^/docs",
"replacement": "https://github.com/STRIDES/NIHCloudLabGCP/tree/main/docs"
},
{
"pattern": "^/tutorials",
"replacement": "https://github.com/STRIDES/NIHCloudLabGCP/tree/main/tutorials"
}

],
"timeout": "20s",
"retryOn429": true,
"retryCount": 5,
"fallbackRetryDelay": "30s",
"aliveStatusCodes": [200, 206]
}

0 comments on commit 2e27e32

Please sign in to comment.