-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (33 loc) · 858 Bytes
/
Copy pathapi-doc.yml
File metadata and controls
40 lines (33 loc) · 858 Bytes
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
name: 📚 OpenAPI Documentation
on:
pull_request:
branches:
- main
- develop
paths:
- 'openapi.yaml'
jobs:
generate-documentation:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
attestations: write
id-token: write
steps:
- name: Checkout ⬇️
uses: actions/checkout@v4.2.2
with:
show-progress: false
- name: 📥 Generate OpenAPI Documentation
run: |
npm install -g openapi-to-md
npx openapi-to-md -s openapi.yaml openapi.md
- name: 📤 Commit changes
uses: actions-js/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
force: true
files: openapi.md
message: 'docs(api): updated openapi.md 📝'
branch: ${{ github.head_ref }}