-
Notifications
You must be signed in to change notification settings - Fork 2
60 lines (49 loc) · 1.8 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
50
51
52
53
54
55
56
57
58
59
60
name: API Docs Integration
on:
push:
branches:
- docs/#52
- develop
jobs:
document:
runs-on: ubuntu-latest
steps:
# 프로젝트 코드를 가져옵니다.
- name: Checkout Code
uses: actions/checkout@v3
with:
ref: 'docs/develop'
# Json 파일 가져오기
- name : collect json
run : |
cp ./noti-service/docs/noti.json ./
cp ./user-service/docs/user.json ./
cp ./weather-service/docs/weather.json ./
# Redoc : json 파일 join
- name: redoc-cli-github-action
uses: seeebiii/redoc-cli-github-action@v9
with:
args: 'join noti.json --prefix-tags-with-filename=true user.json --prefix-tags-with-filename=true weather.json --prefix-tags-with-filename=true --output api.json'
# Redoc : json 파일 join
- name: redoc-cli-github-action
uses: seeebiii/redoc-cli-github-action@v9
with:
args: 'bundle api.json --output api.yaml --ext yaml'
- name: Rename Yaml Title & Desc
run: |
cat api.yaml
yq -i '.info.title = "Waither Backend API Document for FrontEnd"' api.yaml
yq -i '.info.description = "Please contact Petstore backend if there are any issues with API"' api.yaml
- name: redoc-cli-github-action
uses: seeebiii/redoc-cli-github-action@v9
with:
args: 'build-docs api.yaml --output index.html'
# 웹페이지 Repository에 Push 합니다.
- name: Install SSH Key
uses: leigholiver/[email protected]
with:
source: ./index.html
destination_folder: docs
destination_repo: WaitherTeam/WaitherTeam.github.io
destination_branch: main
deploy_key: ${{ secrets.DEPLOY_KEY }}