diff --git a/.github/workflows/markdown-links.yml b/.github/workflows/markdown-links.yml index 6aef1baf8..d9de1359f 100644 --- a/.github/workflows/markdown-links.yml +++ b/.github/workflows/markdown-links.yml @@ -1,23 +1,20 @@ name: Check Markdown links on: - push: - branches: - - main - pull_request: - branches: [main] + schedule: + # 2am UTC daily + - cron: '0 2 * * *' jobs: markdown-link-check: + strategy: + matrix: + branch: ['main', 'v0.37.x', 'v0.34.x'] runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: technote-space/get-diff-action@v6 with: - PATTERNS: | - **/**.md - - uses: creachadair/github-action-markdown-link-check@master + ref: ${{ matrix.branch }} + - uses: informalsystems/github-action-markdown-link-check@main with: - check-modified-files-only: 'yes' config-file: '.md-link-check.json' - if: env.GIT_DIFF diff --git a/.md-link-check.json b/.md-link-check.json index 6f47fa2c9..68f3c1482 100644 --- a/.md-link-check.json +++ b/.md-link-check.json @@ -2,5 +2,16 @@ "retryOn429": true, "retryCount": 5, "fallbackRetryDelay": "30s", - "aliveStatusCodes": [200, 206, 503] + "aliveStatusCodes": [200, 206, 503], + "httpHeaders": [ + { + "urls": [ + "https://docs.github.com/", + "https://help.github.com/" + ], + "headers": { + "Accept-Encoding": "zstd, br, gzip, deflate" + } + } + ] }