-
Notifications
You must be signed in to change notification settings - Fork 10
46 lines (40 loc) · 1.18 KB
/
check-node-docs-sync.yml
File metadata and controls
46 lines (40 loc) · 1.18 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
name: Check Node Documentation Sync
on:
pull_request:
branches:
- main
jobs:
check-sync:
name: 'Verify Node Documentation is Synced'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run documentation sync scripts
run: |
npm run node-generate-changelog
npm run node-update-setup-guide
npm run node-update-config
npm run node-update-docker-compose
npm run node-generate-api-docs
- name: Check for uncommitted changes
run: |
if [[ -n "$(git status --porcelain)" ]]; then
echo "::error::Documentation is out of sync. Please run the sync scripts locally and commit the changes."
echo ""
echo "Files with uncommitted changes:"
git status --porcelain
echo ""
echo "Diff:"
git diff
exit 1
else
echo "Documentation is in sync."
fi