-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (39 loc) · 1.26 KB
/
apiDocs.yml
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
name: API Docs Integration
on:
push:
branches:
- docs/#44
jobs:
document:
runs-on: ubuntu-latest
steps:
# 프로젝트 코드를 가져옵니다.
- name: Checkout Code
uses: actions/checkout@v3
with:
ref: 'docs/#44'
- name: move to docs directory
run: |
cd ./noti-service/docs
- name: redoc-cli-github-action
uses: seeebiii/redoc-cli-github-action@v9
with:
args: 'bundle ./noti.json --output ./noti.yaml --ext yaml'
- name: Rename Yaml Title & Desc
run: |
yq -i '.info.title = "PetStore Backend API Document for FrontEnd"' ./noti.yaml
yq -i '.info.description = "Please contact Petstore backend if there are any issues with API"' ./noti.yaml
- name: redoc-cli-github-action
uses: seeebiii/redoc-cli-github-action@v9
with:
args: 'build-docs ./noti.yaml --output ./api-docs.html'
- name: save build result to tmp dir
run: |
cd ../..
mkdir -p docs
mv ./noti-service/api-docs.html .
- name: Commit and push build artifacts
run: |
git add .
git commit -m "📝docs : Generate API Docs"
git push origin apiDocs