-
Notifications
You must be signed in to change notification settings - Fork 9
39 lines (33 loc) · 1.08 KB
/
swagger-jsdoc.yml
File metadata and controls
39 lines (33 loc) · 1.08 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
name: Generate OpenAPI Docs
on:
pull_request:
jobs:
build-openapi-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
fetch-depth: 0
- name: Use Node 22.15.0
uses: actions/setup-node@v4
with:
node-version: '22.15.0'
- name: Install dependencies
run: npm ci --ignore-scripts --omit=optional
- name: Generate OpenAPI JSON files
run: npm run generate-openapi
- name: Commit generated OpenAPI docs
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add doc/gatekeeper-api.json
git add doc/keymaster-api.json
if git diff-index --quiet HEAD --; then
echo "No changes to commit"
else
git commit -m "chore: update generated OpenAPI docs" || true
git push
fi