📝docs : Update ci.yml #69
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |