From d97109a3c3484da045ea3c2289d57f155db0eaf4 Mon Sep 17 00:00:00 2001 From: David Brett Date: Sat, 3 Oct 2026 11:09:38 +0200 Subject: [PATCH 1/3] Add workflow to check for broken links --- .github/workflows/link-check.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/link-check.yml diff --git a/.github/workflows/link-check.yml b/.github/workflows/link-check.yml new file mode 100644 index 0000000..86a6fc6 --- /dev/null +++ b/.github/workflows/link-check.yml @@ -0,0 +1,28 @@ +name: Link Check + +on: + workflow_dispatch: + push: + branches: + - main + paths: + - "**.md" + pull_request: + paths: + - "**.md" + +jobs: + link-check: + name: Check links + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Check links + uses: lycheeverse/lychee-action@v2 + with: + # --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 From 2997fc2ff6ea03cb08dad31a6efc88ec16e11dde Mon Sep 17 00:00:00 2001 From: David Brett Date: Sun, 8 Nov 2026 09:28:01 +0100 Subject: [PATCH 2/3] Run link check on all pull requests Removing the path filters means the check always reports a status, so it can be made required without leaving other PRs waiting indefinitely. It also covers asset-only changes, since images are validated by the check. --- .github/workflows/link-check.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/link-check.yml b/.github/workflows/link-check.yml index 86a6fc6..849ca48 100644 --- a/.github/workflows/link-check.yml +++ b/.github/workflows/link-check.yml @@ -5,16 +5,20 @@ on: push: branches: - main - paths: - - "**.md" pull_request: - paths: - - "**.md" + +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 From 848aeaeb3943581a5f4d640d5bc30d11fa58569c Mon Sep 17 00:00:00 2001 From: David Brett Date: Sun, 8 Nov 2026 09:36:20 +0100 Subject: [PATCH 3/3] Keep credentials out of the link check The offline check makes no API calls, so it does not need checkout credentials or a GitHub token. --- .github/workflows/link-check.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/link-check.yml b/.github/workflows/link-check.yml index 849ca48..e0b3e2f 100644 --- a/.github/workflows/link-check.yml +++ b/.github/workflows/link-check.yml @@ -21,10 +21,14 @@ jobs: 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'