forked from cilium/tetragon
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (40 loc) · 1.32 KB
/
check-links-pr.yaml
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: Check docs links
on:
pull_request:
paths:
- 'docs/content/**.md'
- '.github/workflows/check-links-pr.yaml'
jobs:
links-checker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Hugo
uses: peaceiris/actions-hugo@16361eb4acea8698b220b76c0d4e84e1fd22c61d # v2.6.0
with:
hugo-version: '0.111.2'
extended: true
- name: Serve the Hugo website
working-directory: docs
run: hugo server &
- name: Wait for server to be ready
uses: nick-invision/retry@14672906e672a08bd6eeb15720e9ed3ce869cdd4 # v2.9.0
with:
timeout_seconds: 2
max_attempts: 10
retry_wait_seconds: 3
command: |
set -e
curl -s http://localhost:1313 > /dev/null
- name: Links Checker
id: lychee
uses: lycheeverse/lychee-action@2b973e86fc7b1f6b36a93795fe2c9c6ae1118621 # v1.10.0
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
args: --base http://localhost:1313 --exclude cilium.herokuapp.com docs/content
fail: true
format: json