Skip to content

Commit 6b76528

Browse files
committed
chore: docs workflow
1 parent e13fe67 commit 6b76528

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/publish-docs.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- "docs/**"
9+
env:
10+
STORE_PATH: ~/.pnpm-store
11+
12+
jobs:
13+
build-and-deploy:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: checkout code repository
18+
uses: actions/checkout@v3
19+
20+
- name: setup node.js
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: 20
24+
25+
- name: setup pnpm
26+
uses: pnpm/action-setup@v3
27+
with:
28+
version: 8
29+
run_install: false
30+
31+
- name: Setup pnpm cache
32+
uses: actions/cache@v3
33+
with:
34+
path: ${{ env.STORE_PATH }}
35+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
36+
restore-keys: |
37+
${{ runner.os }}-pnpm-store-
38+
39+
- name: install dependencies
40+
run: pnpm install --frozen-lockfile
41+
42+
- name: Build with Rspress
43+
run: npm run build # Rspress 빌드를 위한 명령어
44+
45+
- name: Deploy to GitHub Pages
46+
uses: peaceiris/actions-gh-pages@v3
47+
with:
48+
github_token: ${{ secrets.GITHUB_TOKEN }}
49+
publish_dir: ./doc_build # 빌드 결과 디렉토리

0 commit comments

Comments
 (0)