diff --git a/.github/workflows/link-checker.yml b/.github/workflows/link-checker.yml new file mode 100644 index 00000000..5f5f27e1 --- /dev/null +++ b/.github/workflows/link-checker.yml @@ -0,0 +1,27 @@ +name: 'Check Markdown links' + +on: + push: + branches: [main] + paths: + - '**.md' + pull_request: + paths: + - '**.md' + schedule: + - cron: '0 5 * * 2' + +jobs: + markdown-link-check: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Check links in changed files + uses: gaurav-nelson/github-action-markdown-link-check@v1 + with: + config-file: '.github/workflows/mlc_config.json' + check-modified-files-only: 'yes' + base-branch: 'main' + file-extension: '.md' diff --git a/.github/workflows/mlc_config.json b/.github/workflows/mlc_config.json new file mode 100644 index 00000000..a94e0cfd --- /dev/null +++ b/.github/workflows/mlc_config.json @@ -0,0 +1,19 @@ +{ + "retryCount": 3, + "retryDelay": 5, + "aliveStatusCodes": [200, 429], + "ignorePatterns": [ + { + "pattern": "^https?://web.archive.org" + }, + { + "pattern": "^https?://github.com/eth-protocol-fellows/protocol-studies/(issues|pulls)" + }, + { + "pattern": "^https?://yewtu.be" + }, + { + "pattern": "^https?://www.gnu.org" + } + ] +}