Skip to content

๐Ÿ“docs : api docs ์ˆ˜์ • #33

๐Ÿ“docs : api docs ์ˆ˜์ •

๐Ÿ“docs : api docs ์ˆ˜์ • #33

Workflow file for this run

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: 'develop'
# Json ํŒŒ์ผ ๊ฐ€์ ธ์˜ค๊ธฐ
- name : collect json
run : |
cp ./noti-service/docs/noti.json ./
cp ./user-service/docs/user.json ./
cp ./weather-service/docs/weather.json ./
ls -all
# Redoc : json ํŒŒ์ผ join
- name: redoc-cli-github-action
uses: seeebiii/redoc-cli-github-action@v9
with:
args: 'join ./noti.json ./user.json ./weather.json -o ./api.json'
- name : ls
run : |
pwd
ls -all
# 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 --verbose'
- 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 }}