Skip to content

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

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

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

Workflow file for this run

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'
# Redoc : json ํŒŒ์ผ์„ ๊ฐ€์ ธ์™€ bundle
- name: redoc-cli-github-action
uses: seeebiii/redoc-cli-github-action@v9
with:
args: 'bundle ./noti-service/docs/noti.json --output ./noti-service/docs/index.html --ext html'
# - name: Rename Yaml Title & Desc
# run: |
# cat ./noti-service/docs/noti.yaml
# yq -i '.info.title = "PetStore Backend API Document for FrontEnd"' ./noti-service/docs/noti.yaml
# yq -i '.info.description = "Please contact Petstore backend if there are any issues with API"' ./noti-service/docs/noti.yaml
# - name: redoc-cli-github-action
# uses: seeebiii/redoc-cli-github-action@v9
# with:
# args: 'build-docs ./noti-serivce/docs/noti.yaml --output ./noti-serivce/docs/api-docs.html'
# ์™„์„ฑ๋œ html ํŒŒ์ผ์„ docs ๋””๋ ‰ํ† ๋ฆฌ์— ๋†“์Šต๋‹ˆ๋‹ค.
- name: save build result to tmp dir
run: |
mkdir -p docs
mv ./noti-service/docs/index.html ./docs
# ์›นํŽ˜์ด์ง€ Repository์— Push ํ•ฉ๋‹ˆ๋‹ค.
- name: Install SSH Key
uses: leigholiver/[email protected]
with:
source: ./docs/index.html
destination_folder: docs
destination_repo: WaitherTeam/WaitherTeam.github.io
destination_branch: main
deploy_key: ${{ secrets.DEPLOY_KEY }}