-
-
Notifications
You must be signed in to change notification settings - Fork 12
63 lines (52 loc) · 1.53 KB
/
check-links.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
name: Check documentation links
on:
push:
paths:
- ".github/workflows/check-links.yml"
- "Taskfile.yml"
- "**.md"
pull_request:
paths:
- ".github/workflows/check-links.yml"
- "Taskfile.yml"
- "**.md"
schedule:
# Run every Tuesday at 03:00 UTC to catch broken links caused by external changes
- cron: "0 3 * * 2"
jobs:
check-links:
runs-on: ubuntu-latest
env:
DOCUMENTATION_REQUIREMENTS_PATH: ./docs/requirements_docs.txt
steps:
- name: Checkout local repository
uses: actions/checkout@v2
- name: Install Taskfile
uses: arduino/setup-task@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: "1.14"
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles(env.DOCUMENTATION_REQUIREMENTS_PATH) }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install Poetry
run: |
python -m pip install --upgrade pip
python -m pip install poetry
- name: Build documentation website
# Ensure the documentation can build. These docs won't be published.
run: task docs:build
- name: Check links
run: task --silent docs:check-links