File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change
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 # 빌드 결과 디렉토리
You can’t perform that action at this time.
0 commit comments