diff --git a/.github/workflows/link.yaml b/.github/workflows/link.yaml new file mode 100644 index 000000000..fc01b7a64 --- /dev/null +++ b/.github/workflows/link.yaml @@ -0,0 +1,33 @@ +name: Links + +on: + repository_dispatch: + workflow_dispatch: + schedule: + - cron: "0 0 * * 1" + +jobs: + linkChecker: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Download Exclude Path + run: | + curl https://raw.githubusercontent.com/pingcap/docs/master/.lycheeignore --output .lycheeignore + + - name: Check Links + uses: lycheeverse/lychee-action@v1.5.0 + with: + # For parameter description, see https://github.com/lycheeverse/lychee#commandline-parameters + args: -E --exclude-mail -v -i -n -t 45 -- **/*.md + output: out.md + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + + - name: Create Issue From File + uses: peter-evans/create-issue-from-file@v3 + with: + title: Broken Link Detected + content-filepath: out.md + assignees: ran-huang \ No newline at end of file