diff --git a/.github/workflows/ci-check-md-links.yml b/.github/workflows/ci-check-md-links.yml new file mode 100644 index 00000000000..ca8e6fa31d7 --- /dev/null +++ b/.github/workflows/ci-check-md-links.yml @@ -0,0 +1,20 @@ +name: Check Markdown links +# https://github.com/gaurav-nelson/github-action-markdown-link-check + +on: + push: + branches: [master, "release/*"] + pull_request: + branches: [master, "release/*"] + types: [opened, reopened, ready_for_review, synchronize] + paths: + - ".github/workflows/ci-check-md-links.yml" + - ".github/workflows/markdown.links.config.json" + - "**/*.md" + +jobs: + check-md-links: + if: github.event.pull_request.draft == false + uses: Lightning-AI/utilities/.github/workflows/check-md-links.yml@v0.9.0 + with: + 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 00000000000..b5425f753f9 --- /dev/null +++ b/.github/workflows/markdown.links.config.json @@ -0,0 +1,15 @@ +{ + "ignorePatterns": [ + { + "pattern": "^https://github.com/Lightning-AI/torchmetrics/pull/.*" + }, + ], + "httpHeaders": [ + { + "urls": ["https://github.com/", "https://guides.github.com/", "https://help.github.com/", "https://docs.github.com/"], + "headers": { + "Accept-Encoding": "zstd, br, gzip, deflate" + } + } + ] +}