From e7e029c04f5401f21424792327d6bf60bb591af7 Mon Sep 17 00:00:00 2001 From: Jeff Dairiki Date: Sun, 18 Aug 2024 19:03:34 -0700 Subject: [PATCH] refactor(tests): use `hyperlink` rather than `htmltest` for link checking It's very fast, only checks internal links, and it's easy to use. --- .github/workflows/deploy.yml | 7 +------ pyproject.toml | 2 ++ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0ae621fb..31ca2d98 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -39,12 +39,7 @@ jobs: run: pdm run build - name: Check for broken internal links - uses: wjdp/htmltest-action@master - with: - path: _htdocs - config: .htmltest.yml - skip_external: true - log_level: 1 + run: pdm run check-links - name: Deploy lektor website if: env.DEPLOY == 'true' diff --git a/pyproject.toml b/pyproject.toml index 32b9e44f..e7523fa2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,3 +35,5 @@ _.env = {LEKTOR_OUTPUT_PATH = "_htdocs"} build = "lektor build -f webpack" server = "lektor server -f webpack" deploy = "lektor deploy ghpages-https" + +check-links = "npx --yes @untitaker/hyperlink@~0.1.32 --check-anchors _htdocs"