From e2fe83143588bf8b51930796a597ed6cf4a0de7f Mon Sep 17 00:00:00 2001 From: Simon Perkins Date: Mon, 1 Sep 2025 10:44:24 +0200 Subject: [PATCH 1/4] Add checks for broken http links --- .github/workflows/pre-commit.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 591a9b3..43813aa 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -13,3 +13,11 @@ jobs: with: python-version: 3.11 - uses: pre-commit/action@v3.0.1 + http-lint: + runs-on: ubuntu-latest + steps: + - name: Link Checker + id: lychee + uses: lycheeverse/lychee-action@v2 + with: + fail: false From 8e9ddb421b72d84befbc40e868ebc216b45698c0 Mon Sep 17 00:00:00 2001 From: Simon Perkins Date: Mon, 1 Sep 2025 10:50:45 +0200 Subject: [PATCH 2/4] Fold link and pre-commit checks into a single static check job --- .github/workflows/pre-commit.yml | 20 ++++++++++---------- .github/workflows/static-checks.yml | 24 ++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/static-checks.yml diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 43813aa..e166dab 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -1,23 +1,23 @@ -name: pre-commit +name: static-checks on: [push] jobs: - pre-commit: + static-checks: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 with: fetch-depth: 1 + - uses: actions/setup-python@v5 with: python-version: 3.11 + - uses: pre-commit/action@v3.0.1 - http-lint: - runs-on: ubuntu-latest - steps: - - name: Link Checker - id: lychee - uses: lycheeverse/lychee-action@v2 - with: - fail: false + + - name: Link Checker + id: lychee + uses: lycheeverse/lychee-action@v2 + with: + fail: false diff --git a/.github/workflows/static-checks.yml b/.github/workflows/static-checks.yml new file mode 100644 index 0000000..a4d621a --- /dev/null +++ b/.github/workflows/static-checks.yml @@ -0,0 +1,24 @@ +name: pre-commit + +on: [push] + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + with: + fetch-depth: 1 + - uses: actions/setup-python@v5 + with: + python-version: 3.11 + - uses: pre-commit/action@v3.0.1 + http-lint: + runs-on: ubuntu-latest + steps: + - name: Link Checker + id: lychee + args: --base . --verbose --no-progress './**/*.md' './**/*.html' './**/*.rst' + uses: lycheeverse/lychee-action@v2 + with: + fail: false From 8809f130652f62c1c5ab9230cf49b3347adcd972 Mon Sep 17 00:00:00 2001 From: Simon Perkins Date: Mon, 1 Sep 2025 10:56:10 +0200 Subject: [PATCH 3/4] Also check fragment links --- .github/workflows/pre-commit.yml | 23 ----------------------- .github/workflows/static-checks.yml | 2 +- 2 files changed, 1 insertion(+), 24 deletions(-) delete mode 100644 .github/workflows/pre-commit.yml diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml deleted file mode 100644 index e166dab..0000000 --- a/.github/workflows/pre-commit.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: static-checks - -on: [push] - -jobs: - static-checks: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - with: - fetch-depth: 1 - - - uses: actions/setup-python@v5 - with: - python-version: 3.11 - - - uses: pre-commit/action@v3.0.1 - - - name: Link Checker - id: lychee - uses: lycheeverse/lychee-action@v2 - with: - fail: false diff --git a/.github/workflows/static-checks.yml b/.github/workflows/static-checks.yml index a4d621a..cae912c 100644 --- a/.github/workflows/static-checks.yml +++ b/.github/workflows/static-checks.yml @@ -18,7 +18,7 @@ jobs: steps: - name: Link Checker id: lychee - args: --base . --verbose --no-progress './**/*.md' './**/*.html' './**/*.rst' uses: lycheeverse/lychee-action@v2 with: + args: --base . --verbose --no-progress './**/*.md' './**/*.html' './**/*.rst' fail: false From 77c5626f25f444a19a9137de656468c830aa4315 Mon Sep 17 00:00:00 2001 From: Simon Perkins Date: Mon, 1 Sep 2025 11:12:10 +0200 Subject: [PATCH 4/4] Update args --- .github/workflows/static-checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/static-checks.yml b/.github/workflows/static-checks.yml index cae912c..14c18dc 100644 --- a/.github/workflows/static-checks.yml +++ b/.github/workflows/static-checks.yml @@ -20,5 +20,5 @@ jobs: id: lychee uses: lycheeverse/lychee-action@v2 with: - args: --base . --verbose --no-progress './**/*.md' './**/*.html' './**/*.rst' + args: --base-url doc --verbose --no-progress './**/*.md' './**/*.html' './**/*.rst' fail: false