File tree Expand file tree Collapse file tree 1 file changed +56
-0
lines changed
Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Deploy
2+
3+ on :
4+ push :
5+ branches : ["main"]
6+ workflow_dispatch :
7+
8+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9+ permissions :
10+ contents : write
11+ pages : write
12+ id-token : write
13+
14+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
15+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
16+ concurrency :
17+ group : " pages"
18+ cancel-in-progress : false
19+ jobs :
20+ build :
21+ runs-on : ubuntu-latest
22+ environment :
23+ name : github-pages
24+ url : ${{ steps.deployment.outputs.page_url }}
25+ steps :
26+ - uses : actions/checkout@v4
27+
28+ - name : Use Node.js 20
29+
30+ uses : actions/setup-node@v3
31+ with :
32+ node-version : " 20.x"
33+
34+ - name : Build
35+ env :
36+ NODE_ENV : production
37+ run : |
38+ npm install
39+ npm run build
40+ - name : Setup Pages
41+ uses : actions/configure-pages@v5
42+ - name : Upload artifact
43+ uses : actions/upload-pages-artifact@v3
44+ with :
45+ # Upload entire repository
46+ path : " ./dist"
47+ - name : Deploy to GitHub Pages
48+ id : deployment
49+ uses : actions/deploy-pages@v4
50+
51+ - name : Deploy
52+ uses : peaceiris/actions-gh-pages@v4
53+ with :
54+ github_token : ${{ secrets.GITHUB_TOKEN }}
55+ publish_dir : ./dist
56+ publish_branch : build
You can’t perform that action at this time.
0 commit comments