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 Vite site to Pages
2+
3+ on :
4+ push :
5+ branches : ["main"]
6+
7+ permissions :
8+ contents : read
9+ pages : write
10+ id-token : write
11+
12+ jobs :
13+ build :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Checkout
17+ uses : actions/checkout@v4
18+ - name : Set up Node
19+ uses : actions/setup-node@v4
20+ with :
21+ node-version : 20
22+ cache : ' npm'
23+ - name : Install dependencies
24+ run : npm install
25+ - name : Build
26+ run : npm run build
27+ - name : Setup Pages
28+ uses : actions/configure-pages@v4
29+ - name : Upload artifact
30+ uses : actions/upload-pages-artifact@v3
31+ with :
32+ path : ' ./dist'
33+
34+ deploy :
35+ environment :
36+ name : github-pages
37+ url : ${{ steps.deployment.outputs.page_url }}
38+ runs-on : ubuntu-latest
39+ needs : build
40+ steps :
41+ - name : Deploy to GitHub Pages
42+ id : deployment
43+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments