-
Notifications
You must be signed in to change notification settings - Fork 2
59 lines (49 loc) · 1.53 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
name: API Docs Integration
on:
push:
branches:
- develop
jobs:
api-docs-integration:
runs-on: ubuntu-latest
steps:
# 프로젝트 코드 가져오기
- name: Checkout Code
uses: actions/checkout@v3
with:
ref: '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 join
uses: DeltaLaboratory/[email protected]
with:
args: 'join *.json -o api.yaml'
#결과 검사
- name: check result
run: |
ls -al
test -f api.yaml || (echo "Missing api.yaml from previous step." && exit 1)
# Redoc : build-dcos
- name: redoc-cli build docs
uses: DeltaLaboratory/[email protected]
with:
args: 'build-docs api.yaml -o index.html'
#결과 검사
- name: check result
run: |
ls -al
test -f index.html || (echo "Missing index.html from previous step." && exit 1)
# 웹페이지 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 }}