From 4295b5e2226bfbaf003e54c483fef73d84fd1e2b Mon Sep 17 00:00:00 2001 From: fuchanghai <1105596917@qq.com> Date: Sun, 14 Apr 2024 23:14:27 +0800 Subject: [PATCH] =?UTF-8?q?[fix-#689]=20=E6=B7=BB=E5=8A=A0dead=20link=20?= =?UTF-8?q?=E7=9A=84action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deadlink.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/deadlink.yml diff --git a/.github/workflows/deadlink.yml b/.github/workflows/deadlink.yml new file mode 100644 index 00000000..61a71804 --- /dev/null +++ b/.github/workflows/deadlink.yml @@ -0,0 +1,22 @@ +name: dead link check + +on: + pull_request: + schedule: + - cron: '0 18 * * *' # TimeZone: UTC 0 + +jobs: + dead-link: + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v2 + - run: sudo npm install -g markdown-link-check@3.11.2 + - run: sudo apt install plocate -y + # NOTE: Change command from `find . -name "*.md"` to `find . -not -path "*/node_modules/*" -not -path "*/.tox/*" -name "*.md"` + # if you want to run check locally + - run: | + for file in $(locate "$PWD*/*.md" | grep -v ./deploy/terraform/aws/README.md); do + markdown-link-check -c .dlc.json -q "$file" & + done + wait \ No newline at end of file