From b95d6ef4b8e9d3743cd2f49e7b22410920061444 Mon Sep 17 00:00:00 2001 From: Shamsher Ansari Date: Thu, 11 Nov 2021 21:10:08 +0530 Subject: [PATCH] Check broken links in markdown files (#224) * Check broken links in markdown files * use base branch config * only check modified files * run link checker only on pull request --- .github/workflows/docs-lint.yaml | 20 ++++++++++++++++++++ .github/workflows/markdown.links.config.json | 12 ++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 .github/workflows/docs-lint.yaml create mode 100644 .github/workflows/markdown.links.config.json diff --git a/.github/workflows/docs-lint.yaml b/.github/workflows/docs-lint.yaml new file mode 100644 index 000000000..42bf25598 --- /dev/null +++ b/.github/workflows/docs-lint.yaml @@ -0,0 +1,20 @@ +name: Check Markdown links + +on: + pull_request: + paths: + - '**.md' + +jobs: + markdown-link-check: + name: Broken Links + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - uses: gaurav-nelson/github-action-markdown-link-check@v1 + with: + use-quiet-mode: 'yes' + use-verbose-mode: 'yes' + check-modified-files-only: 'yes' + base-branch: 'main' + config-file: '.github/workflows/markdown.links.config.json' diff --git a/.github/workflows/markdown.links.config.json b/.github/workflows/markdown.links.config.json new file mode 100644 index 000000000..f873afb7e --- /dev/null +++ b/.github/workflows/markdown.links.config.json @@ -0,0 +1,12 @@ +{ + "ignorePatterns": [ + { + "pattern": "^http://localhost" + } +], + "timeout": "30s", + "retryOn429": true, + "retryCount": 3, + "fallbackRetryDelay": "30s", + "aliveStatusCodes": [200, 206] +}