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
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ jobs :
9+ build :
10+ name : Build
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - name : Checkout repo
15+ uses : actions/checkout@v4
16+
17+ - name : Setup Node
18+ uses : actions/setup-node@v4
19+ with :
20+ node-version : 20
21+
22+ - name : Install dependencies
23+ uses : bahmutov/npm-install@v1
24+
25+ - name : Hack base path for pages
26+ run : sed '/plugins:.*/a base:"/quack-ui",' vite.config.ts > vite.config.ts
27+
28+ - name : Build project
29+ run : npm run build
30+
31+ - name : Upload production-ready build files
32+ uses : actions/upload-artifact@v3
33+ with :
34+ name : production-files
35+ path : ./dist
36+
37+ deploy :
38+ name : Deploy
39+ needs : build
40+ runs-on : ubuntu-latest
41+ if : github.ref == 'refs/heads/main'
42+
43+ steps :
44+ - name : Download artifact
45+ uses : actions/download-artifact@v3
46+ with :
47+ name : production-files
48+ path : ./dist
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 : ./dist
You can’t perform that action at this time.
0 commit comments