-
Notifications
You must be signed in to change notification settings - Fork 749
Expand file tree
/
Copy pathlink-check.yml
More file actions
46 lines (39 loc) · 1.28 KB
/
link-check.yml
File metadata and controls
46 lines (39 loc) · 1.28 KB
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
name: Link check
on:
workflow_call:
push:
branches:
- master # <- Set branch used for deployment
pull_request:
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-22.04
concurrency:
group: link-check-${{ github.ref }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.136.5'
extended: true
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
# The action defaults to search for the dependency file (package-lock.json,
# npm-shrinkwrap.json or yarn.lock) in the repository root, and uses its
# hash as a part of the cache key.
# https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-data
cache-dependency-path: '**/package-lock.json'
- run: npm ci
- run: hugo --baseURL '' --minify
- name: Link check
uses: untitaker/hyperlink@0.1.42
if: ${{ github.ref == 'refs/heads/master' }} # <- must be same branch as given above
with:
args: public/ # --check-anchors