diff --git a/.github/workflows/link-check.yml b/.github/workflows/link-check.yml new file mode 100644 index 0000000..e0b3e2f --- /dev/null +++ b/.github/workflows/link-check.yml @@ -0,0 +1,36 @@ +name: Link Check + +on: + workflow_dispatch: + push: + branches: + - main + pull_request: + +permissions: + contents: read + +concurrency: + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + +jobs: + link-check: + name: Check links + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Check links + uses: lycheeverse/lychee-action@v2 + with: + # The offline check makes no API calls, so it needs no token + token: "" + # --offline blocks network requests so only internal links are checked. + # --root-dir is needed for docsify's root-relative links such as /plugin-dev.md + args: --offline --root-dir "$(pwd)" --include-fragments --no-progress './**/*.md' + fail: true + jobSummary: true