-
Notifications
You must be signed in to change notification settings - Fork 371
47 lines (40 loc) · 1.34 KB
/
htmltest.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# .github/workflows/htmltest.yml
# Run htmltest link checker on generated HTML output from user guide
name: Link check with htmltest
on:
workflow_dispatch:
push:
branches:
- master
pull_request:
jobs:
htmltest:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Set up Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: "latest"
extended: true
- run: hugo --destination $GITHUB_WORKSPACE/exampleSite/public --themesDir ../../ --theme hugo-fresh
working-directory: exampleSite
- name: Test HTML
# https://github.com/wjdp/htmltest-action/
continue-on-error: true # <- Set to true if run shouldn't fail with broken links
uses: wjdp/htmltest-action@master
with:
# For consistency, use the same config file as for local builds
config: exampleSite/.htmltest.yml
path: exampleSite/public
- name: Archive htmltest results
uses: actions/upload-artifact@v4
with:
name: htmltest-report
path: tmp/.htmltest/htmltest.log
retention-days: 7 # default is 90 days