File tree Expand file tree Collapse file tree 1 file changed +54
-0
lines changed
Expand file tree Collapse file tree 1 file changed +54
-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+
8+ permissions :
9+ contents : write
10+
11+ jobs :
12+ deploy :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout repository
16+ uses : actions/checkout@v4
17+
18+ - name : Setup Node.js
19+ uses : actions/setup-node@v4
20+ with :
21+ node-version : " 20"
22+
23+ - name : Setup pnpm
24+ uses : pnpm/action-setup@v2
25+ with :
26+ version : 8
27+ run_install : false
28+
29+ - name : Get pnpm store directory
30+ shell : bash
31+ run : |
32+ echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_ENV
33+
34+ - name : Setup pnpm cache
35+ uses : actions/cache@v3
36+ with :
37+ path : ${{ env.STORE_PATH }}
38+ key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
39+ restore-keys : |
40+ ${{ runner.os }}-pnpm-store-
41+
42+ - name : Install dependencies
43+ run : pnpm install --frozen-lockfile
44+
45+ - name : Build website
46+ run : pnpm run build
47+ env :
48+ NODE_ENV : production
49+
50+ - name : Deploy to GitHub Pages
51+ uses : peaceiris/actions-gh-pages@v3
52+ with :
53+ github_token : ${{ secrets.GITHUB_TOKEN }}
54+ publish_dir : ./build/client
You can’t perform that action at this time.
0 commit comments