update/ origin이 없는 경우가 있으므로 referer를 확인하도록 함 #101
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: Deploy Docs | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: write | |
steps: | |
# 코드 불러오기 | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# 노드 환경 구축 | |
- name: Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
# pnpm 환경 구축 | |
- uses: pnpm/action-setup@v2 | |
name: Install pnpm | |
id: pnpm-install | |
with: | |
version: 8 | |
run_install: false | |
# 의존성 캐싱 | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
# 캐시 사용 설정 | |
- uses: actions/cache@v3 | |
name: Setup pnpm cache | |
with: | |
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
# 의존성설치 | |
- name: Install Dependencies | |
run: pnpm install | |
# 문서 생성 | |
- name: Build Docs | |
run: pnpm run apidoc | |
# 문서 배포 | |
- name: Deploy Docs | |
uses: peaceiris/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs/api |