Expand file tree Collapse file tree 1 file changed +20
-5
lines changed Original file line number Diff line number Diff line change 3
3
4
4
name : github pages
5
5
6
- on : [push]
6
+ on :
7
+ push :
8
+ branches :
9
+ - main
7
10
8
11
jobs :
9
12
@@ -12,14 +15,26 @@ jobs:
12
15
permissions :
13
16
contents : write
14
17
steps :
15
- - uses : actions/checkout@v4
18
+ - name : Checkout repository
19
+ uses : actions/checkout@v4
20
+ with :
21
+ fetch-depth : 1
22
+ - name : Setup Node.js
16
23
- uses : actions/setup-node@v4
17
24
with :
18
25
node-version : current
19
26
registry-url : https://registry.npmjs.org/
20
- - run : npm install --production
21
- - run : npm run build
22
- - name : Deploy
27
+ cache : pnpm
28
+ - name : Cache pnpm dependencies
29
+ uses : actions/cache@v3
30
+ with :
31
+ path : ~/.pnpm-store
32
+ key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
33
+ restore-keys : |
34
+ ${{ runner.os }}-pnpm-store-
35
+ - run : pnpm install --frozen-lockfile
36
+ - run : pnpm run build
37
+ - name : Deploy to GitHub Pages
23
38
uses : peaceiris/actions-gh-pages@v3
24
39
with :
25
40
github_token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments