docs: index docs #3
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 to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "docs/**" | |
env: | |
STORE_PATH: ~/.pnpm-store | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout code repository | |
uses: actions/checkout@v3 | |
- name: setup node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: setup pnpm | |
uses: pnpm/action-setup@v3 | |
with: | |
version: 8 | |
run_install: false | |
- name: Setup pnpm cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Build with Rspress | |
run: npm run build:docs # Rspress 빌드를 위한 명령어 | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs/doc_build # 빌드 결과 디렉토리 |