-
Notifications
You must be signed in to change notification settings - Fork 31
42 lines (35 loc) · 1.12 KB
/
check-documentation.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
name: Check Documentation
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
check-documentation:
name: Check documentation
runs-on: ubuntu-latest
env:
GO111MODULE: on
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with: { go-version-file: go.mod }
- name: Generate documentation
run: cd tools && go generate ./...
- name: Verify Changed files
uses: tj-actions/verify-changed-files@v20
id: verify-changed-files
with:
files: |
docs
- name: Ensure documentation is up to date
if: steps.verify-changed-files.outputs.files_changed == 'true'
run: |
echo "Changes have been detected in the docs folder."
echo "This can happen if you haven't run 'go generate' after making a change."
echo "Please run go generate and commit the documentation changes to resolve this."
echo "Changed files: ${{ steps.verify-changed-files.outputs.changed_files }}"
git diff
exit 1