-
Notifications
You must be signed in to change notification settings - Fork 8
95 lines (86 loc) · 3.5 KB
/
check-links-in-prod.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# This workflow verifies hyperlinks using the deployed
# docs site. It has to be triggered manually.
name: Check links
on:
workflow_dispatch:
jobs:
check-links:
runs-on: ubuntu-latest
steps:
- name: Pull images
run: docker pull ghcr.io/linkchecker/linkchecker:latest
- name: check-links-in-overview-pages
run: |
docker run --rm --name linkchecker \
ghcr.io/linkchecker/linkchecker:latest \
https://docs.giantswarm.io/overview/ \
--check-extern \
-t 1 -r 2 || echo "failed1=true" >> "$GITHUB_ENV"
continue-on-error: true
- name: check-links-in-getting-started-pages
run: |
docker run --rm --name linkchecker \
ghcr.io/linkchecker/linkchecker:latest \
https://docs.giantswarm.io/getting-started/ \
--check-extern \
-t 1 -r 2 || echo "failed2=true" >> "$GITHUB_ENV"
continue-on-error: true
- name: check-links-in-tutorials-pages
run: |
docker run --rm --name linkchecker \
ghcr.io/linkchecker/linkchecker:latest \
https://docs.giantswarm.io/tutorials/ \
--check-extern \
-t 1 -r 2 || echo "failed3=true" >> "$GITHUB_ENV"
continue-on-error: true
- name: check-links-in-reference-pages
run: |
docker run --rm --name linkchecker \
ghcr.io/linkchecker/linkchecker:latest \
https://docs.giantswarm.io/reference/ \
--check-extern \
-t 1 -r 2 || echo "failed4=true" >> "$GITHUB_ENV"
continue-on-error: true
- name: check-links-in-support-pages
run: |
docker run --rm --name linkchecker \
ghcr.io/linkchecker/linkchecker:latest \
https://docs.giantswarm.io/support/ \
--check-extern \
-t 1 -r 2 || echo "failed5=true" >> "$GITHUB_ENV"
continue-on-error: true
- name: check-links-in-changelogs
run: |
docker run --rm --name linkchecker \
ghcr.io/linkchecker/linkchecker:latest \
https://docs.giantswarm.io/changes/ \
-t 1 -r 2 \
--ignore-url="^https://github.com/giantswarm/docs/.*" \
--ignore-url="^https://.*example\.com/.*" \
--ignore-url="^https://my-org\.github\.com/.*" \
--ignore-url="^https://github\.com/giantswarm/giantswarm/.*" \
--ignore-url=".*gigantic\.io.*" || echo "failed6=true" >> "$GITHUB_ENV"
continue-on-error: true
- name: Report errors
run: |
if [[ $failed1 == "true" ]]; then
echo "There has been some errors in overview checks"
fi
if [[ $failed2 == "true" ]]; then
echo "There has been some errors in getting started checks"
fi
if [[ $failed3 == "true" ]]; then
echo "There has been some errors in tutorials checks"
fi
if [[ $failed4 == "true" ]]; then
echo "There has been some errors in reference checks"
fi
if [[ $failed5 == "true" ]]; then
echo "There has been some errors in support checks"
fi
if [[ $failed6 "true" ]]; then
echo "There has been some errors in changelogs checks"
fi
if [[ $failed1 == "true" ]] || [[ $failed1 }}" == "true" ]] || [[ $failed1 == "true" ]] || [[ $failed1 == "true" ]] || [[ $failed1 == "true" ]] || [[ $failed1 "true" ]]; then
exit 1
fi