From 90b7133f5f9373e4c820e8be52395ffe16b79600 Mon Sep 17 00:00:00 2001 From: ian Date: Thu, 14 Apr 2022 16:06:29 +0800 Subject: [PATCH] add lychee to check external links Refs #327 --- .github/workflows/lychee.yml | 28 ++++++++++++++++++++++++++++ .lycheeignore | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 .github/workflows/lychee.yml create mode 100644 .lycheeignore diff --git a/.github/workflows/lychee.yml b/.github/workflows/lychee.yml new file mode 100644 index 000000000..2fe3e5fb0 --- /dev/null +++ b/.github/workflows/lychee.yml @@ -0,0 +1,28 @@ +name: lychee + +on: + push: + pull_request: + schedule: + - cron: '0 0 1 * *' + +jobs: + links: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Link Checker + uses: lycheeverse/lychee-action@master + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + with: + args: '--verbose --max-retries 4 --no-progress "**/*.md"' + + - name: Create Issue From File + uses: peter-evans/create-issue-from-file@v2 + if: github.event_name == 'schedule' + with: + title: Link Checker Report + content-filepath: ./lychee/out.md + labels: automated issue diff --git a/.lycheeignore b/.lycheeignore new file mode 100644 index 000000000..256272e99 --- /dev/null +++ b/.lycheeignore @@ -0,0 +1,2 @@ +https://talk.nervos.org/ +https://discord.com/invite/nervos