File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Expand file tree Collapse file tree 1 file changed +52
-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-file : .node-version
21+ cache : npm
22+
23+ - name : Install dependencies
24+ uses : bahmutov/npm-install@v1
25+
26+ - name : Build project
27+ run : npm run build
28+
29+ - name : Upload production-ready build files
30+ uses : actions/upload-artifact@v4
31+ with :
32+ name : production-files
33+ path : ./dist
34+
35+ deploy :
36+ name : Deploy
37+ needs : build
38+ runs-on : ubuntu-latest
39+ if : github.ref == 'refs/heads/main'
40+
41+ steps :
42+ - name : Download artifact
43+ uses : actions/download-artifact@v4
44+ with :
45+ name : production-files
46+ path : ./dist
47+
48+ - name : Deploy to GitHub Pages
49+ uses : peaceiris/actions-gh-pages@v3
50+ with :
51+ github_token : ${{ secrets.GITHUB_TOKEN }}
52+ publish_dir : ./dist
You can’t perform that action at this time.
0 commit comments