add GitHub workflow to validate links (close #19)

This commit is contained in:
Frédéric Harper
2024-04-18 10:39:51 -04:00
parent 60e18b520b
commit 2fd255437d
2 changed files with 91 additions and 0 deletions

21
.github/workflows/check-links.yml vendored Normal file
View File

@@ -0,0 +1,21 @@
---
name: Markdown Links Validation
on: [push, workflow_dispatch]
jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- name: Checkout this repository
uses: actions/checkout@v4.1.0
- name: Validate Links Markdown files
if: always()
uses: gaurav-nelson/github-action-markdown-link-check@1.0.15
with:
config-file: '.markdownlinkcheck.json'
use-quiet-mode: 'yes'
file-extension: '.md'

70
.markdownlinkcheck.json Normal file
View File

@@ -0,0 +1,70 @@
{
"ignorePatterns": [
{
"pattern": "^https://www.linkedin.com.*"
},
{
"pattern": ".*\\]$"
},
{
"pattern": "https://www.enterprisetimes.co.uk*"
},
{
"pattern": "https://www.pexels.com*"
},
{
"pattern": "https://www.pngrepo.com"
},
{
"pattern": "https://tdwi.org*"
},
{
"pattern": "https://www.fakepersongenerator.com*"
},
{
"pattern": "https://dash.readme.com*"
},
{
"pattern": "https://cfpland.com*"
},
{
"pattern": "https://n8n.io*"
},
{
"pattern": "https://confs.tech*"
},
{
"pattern": "https://businesswire.com*"
},
{
"pattern": "https://www.tmcnet.com*"
},
{
"pattern": "https://.*kubefirst.dev*"
},
{
"pattern": "http://localhost*"
},
{
"pattern": "https://gitlab.com*"
},
{
"pattern": "https://.*vultr.com*"
}
],
"replacementPatterns": [
{
"pattern": "{require(\"(*)\").default}",
"replacement": "*"
},
{
"pattern": "^/img/*",
"replacement": "/static/img/*"
}
],
"timeout": "30s",
"retryOn429": true,
"retryCount": 2,
"fallbackRetryDelay": "1m",
"aliveStatusCodes": [200, 429]
}