From 583afee49c1afd3f52686662068e6b1a88266efb Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Tue, 21 Jun 2022 01:22:22 +0800 Subject: [PATCH] Add markdown-link-check GitHub Docs workaround, cc #1739 Reference: - https://github.com/tcort/markdown-link-check/issues/201 --- .github/workflows/markdown-link-check.yml | 3 ++- markdown_link_check_config.json | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 markdown_link_check_config.json diff --git a/.github/workflows/markdown-link-check.yml b/.github/workflows/markdown-link-check.yml index 93ccabb29..8dfb107f0 100644 --- a/.github/workflows/markdown-link-check.yml +++ b/.github/workflows/markdown-link-check.yml @@ -4,6 +4,7 @@ on: pull_request: paths: - "**/*.md" + - ".markdown-link-check.json" permissions: contents: read @@ -19,4 +20,4 @@ jobs: - name: Install markdown-link-check run: npm i -g markdown-link-check - name: Run markdown-link-check on MD files - run: find . -name "*.md" | xargs -n 1 markdown-link-check -q + run: find . -name "*.md" | xargs -n 1 markdown-link-check -c markdown_link_check_config.json -q diff --git a/markdown_link_check_config.json b/markdown_link_check_config.json new file mode 100644 index 000000000..1b8b1d40f --- /dev/null +++ b/markdown_link_check_config.json @@ -0,0 +1,12 @@ +{ + "httpHeaders": [ + { + "urls": [ + "https://docs.github.com" + ], + "headers": { + "Accept-Encoding": "br, gzip, deflate" + } + } + ] +}