-
Notifications
You must be signed in to change notification settings - Fork 17
83 lines (69 loc) · 2.1 KB
/
checks.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
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
name: Checks
# Triggered when code is pushed to any branch in a repository
on: push
jobs:
spellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# need Node 16 or less to get rid of ERR_OSSL_EVP_UNSUPPORTED
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Generate dist
run: |
yarn install
yarn build
- name: "Check dist dir consistency"
uses: andstor/file-existence-action@v1
with:
files: "dist/docs/index.html"
allow_failure: true # Makes the Action fail on missing files
- uses: rojopolis/[email protected]
name: Spellcheck
with:
config_path: scripts/spellcheck.yaml
broken_links:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# need Node 16 or less to get rid of ERR_OSSL_EVP_UNSUPPORTED
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Generate dist
run: |
yarn install
yarn build
cat > ./dist/index.html << EOF
<!DOCTYPE html>
<html>
<head>
Local deployment on https://test.merginmaps.com/docs
</head>
<body>
<a href="https://test.merginmaps.com/docs">https://test.merginmaps.com/docs</a>
</body>
</html>
EOF
- name: Set variables
run: |
EXCLUDE_LIST=$(cat scripts/broken-link-exceptions.txt)
echo "EXCLUDE_LIST=$EXCLUDE_LIST" >> $GITHUB_ENV
- name: Check broken links
uses: ruzickap/action-my-broken-link-checker@v2
with:
url: https://test.merginmaps.com
cmd_params: --buffer-size=8192 --max-connections=10 --color=always --skip-tls-verification --timeout=60 ${{ env.EXCLUDE_LIST }}
pages_path: ./dist/
debug: true
markdown_checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Find markdown style errors
run: |
./scripts/markdown_style.bash
- name: Find unreferenced images
run: |
./scripts/unreferenced_images.bash