forked from modelcontextprotocol/modelcontextprotocol
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (51 loc) · 1.7 KB
/
render-seps.yml
File metadata and controls
63 lines (51 loc) · 1.7 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Render SEPs
on:
push:
branches:
- main
paths:
- "seps/**/*.md"
- "scripts/render-seps.ts"
pull_request:
paths:
- "seps/**/*.md"
- "scripts/render-seps.ts"
# Allow manual trigger
workflow_dispatch:
permissions:
contents: write
jobs:
render-seps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 24
cache: npm
- run: npm ci
# On PR, verify rendered docs are up to date (must run BEFORE generate)
- name: Verify SEPs are up to date
if: github.event_name == 'pull_request'
run: npm run check:seps
# On push to main, generate and commit any changes
- name: Render SEPs
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
run: npm run generate:seps
- name: Check for changes
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
id: changes
run: |
if [[ -n "$(git status --porcelain docs/community/seps/ docs/docs.json)" ]]; then
echo "has_changes=true" >> $GITHUB_OUTPUT
else
echo "has_changes=false" >> $GITHUB_OUTPUT
fi
- name: Commit changes
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && steps.changes.outputs.has_changes == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add docs/community/seps/ docs/docs.json
git commit -m "docs: auto-render SEPs documentation"
git push