Skip to content

Commit 5767b2d

Browse files
committed
Add htmltest
1 parent f860d60 commit 5767b2d

2 files changed

Lines changed: 32 additions & 2 deletions

File tree

.github/workflows/hugo.yaml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ concurrency:
1212
group: "pages"
1313
cancel-in-progress: false
1414

15+
env:
16+
HUGO_VERSION: 0.145.0
17+
HTMLTEST_VERSION: 0.17.0
18+
1519
jobs:
1620
# # https://github.com/pre-commit/action
1721
# pre-commit:
@@ -26,8 +30,6 @@ jobs:
2630

2731
build:
2832
runs-on: ubuntu-24.04
29-
env:
30-
HUGO_VERSION: 0.145.0
3133
steps:
3234
- name: Install Hugo CLI
3335
run: |
@@ -68,6 +70,29 @@ jobs:
6870
with:
6971
path: ./public
7072

73+
linkcheck:
74+
runs-on: ubuntu-24.04
75+
steps:
76+
- name: Install Hugo CLI
77+
run: |
78+
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
79+
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
80+
81+
- name: Install linkchecker
82+
run: |
83+
curl -sfL "https://github.com/wjdp/htmltest/releases/download/v${HTMLTEST_VERSION}/htmltest_${HTMLTEST_VERSION}_linux_amd64.tar.gz" | tar -zxf - htmltest
84+
85+
- name: Checkout
86+
uses: actions/checkout@v4
87+
with:
88+
submodules: recursive
89+
90+
- name: Build with Hugo
91+
run: hugo
92+
93+
- name: Run linkchecker
94+
run: ./htmltest
95+
7196
deploy:
7297
if: github.ref == 'refs/heads/main'
7398
environment:

.htmltest.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# https://github.com/wjdp/htmltest
2+
3+
DirectoryPath: public
4+
IgnoreURLs:
5+
- example.org

0 commit comments

Comments
 (0)