From 120eec5ead393c4e6705842ad5cea033eaeefa66 Mon Sep 17 00:00:00 2001 From: Benson Muite Date: Sat, 11 Apr 2026 19:40:09 +0300 Subject: [PATCH] Check for broken site links During CI, a light web server is setup: https://docs.python.org/3/library/http.server.html#command-line-interface The the site is crawled to find broken links: https://linkchecker.github.io/linkchecker/man/linkchecker.html At the moment it just reports broken links in CI output. --- .github/workflows/deploy.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 38d8859..900d0c4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -16,7 +16,7 @@ jobs: run: | zypper refresh zypper --non-interactive update - zypper --non-interactive install git libxslt lowdown make sblg nodejs npm + zypper --non-interactive install git libxslt linkchecker lowdown make python3 sblg nodejs npm - uses: actions/checkout@v6 with: submodules: recursive @@ -30,6 +30,11 @@ jobs: run: | mkdir site make install PREFIX=$(pwd)/site + - name: check for broken links + run: | + python3 -m http.server -d site 8000 > server.log & + sleep 10 + linkchecker -o Failures --check-extern http://0.0.0.0:8000/ || true - name: Upload artifact uses: actions/upload-pages-artifact@v4 with: