forked from github/github-mcp-server
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (40 loc) · 1.15 KB
/
docs-check.yml
File metadata and controls
47 lines (40 loc) · 1.15 KB
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
name: Documentation Check
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
permissions:
contents: read
jobs:
docs-check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Build docs generator
run: go build -o github-mcp-server ./cmd/github-mcp-server
- name: Generate documentation
run: ./github-mcp-server generate-docs
- name: Check for documentation changes
run: |
if ! git diff --exit-code README.md; then
echo "❌ Documentation is out of date!"
echo ""
echo "The generated documentation differs from what's committed."
echo "Please run the following command to update the documentation:"
echo ""
echo " go run ./cmd/github-mcp-server generate-docs"
echo ""
echo "Then commit the changes."
echo ""
echo "Changes detected:"
git diff README.md
exit 1
else
echo "✅ Documentation is up to date!"
fi