-
Notifications
You must be signed in to change notification settings - Fork 37
62 lines (57 loc) · 1.6 KB
/
docs.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
---
name: Docs
on:
push:
branches: [ main ]
paths:
- '**.md'
pull_request:
branches: [ main ]
paths:
- '**.md'
jobs:
markdown-link-check:
name: Broken Links
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Run link check
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: 'no'
use-verbose-mode: 'yes'
check-modified-files-only: 'yes'
config-file: '.github/mlc_config.json'
base-branch: main
autogenerated-doc-check:
name: Verify Auto-Generated Docs
strategy:
matrix:
os: [ubuntu-latest]
go-version: [1.21.x]
runs-on: ${{ matrix.os }}
steps:
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Fail if auto-generated docs are modified
run: |
set +e
cd docs && make test
exitcode=$?
echo "exitcode=$exitcode" >> $GITHUB_OUTPUT
if [ $exitcode -eq 1 ] ; then
echo
echo -e "\e[31mAuto-generated docs have been modified incorrectly."
echo -e "\e[31mAuto-generated docs changes should be made in ./docs/src"
echo -e "\e[31mPlease update your PR to address these issues.\e[0m"
exit $exitcode
fi
exit $exitcode