File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy to GitHub Pages
2+
3+ on :
4+ push :
5+ branches : ' main'
6+
7+ jobs :
8+ build_site :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : Checkout
12+ uses : actions/checkout@v4
13+
14+ - name : Install pnpm
15+ uses : pnpm/action-setup@v3
16+ with :
17+ version : 10
18+
19+ - name : Install Node.js
20+ uses : actions/setup-node@v4
21+ with :
22+ node-version : 20
23+ cache : pnpm
24+
25+ - name : Install dependencies
26+ run : pnpm install
27+
28+ - name : build
29+ env :
30+ BASE_PATH : ' /${{ github.event.repository.name }}'
31+ run : |
32+ pnpm run build
33+
34+ - name : Upload Artifacts
35+ uses : actions/upload-pages-artifact@v3
36+ with :
37+ path : ' build/'
38+
39+ deploy :
40+ needs : build_site
41+ runs-on : ubuntu-latest
42+
43+ permissions :
44+ pages : write
45+ id-token : write
46+
47+ environment :
48+ name : github-pages
49+ url : ${{ steps.deployment.outputs.page_url }}
50+
51+ steps :
52+ - name : Deploy
53+ id : deployment
54+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments