File tree Expand file tree Collapse file tree 1 file changed +57
-0
lines changed
Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy to GitHub Pages
2+
3+ on :
4+ # Trigger the workflow every time you push to the main branch
5+ push :
6+ branches : ["main"]
7+ # Allows you to run this workflow manually from the Actions tab
8+ workflow_dispatch :
9+
10+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
11+ permissions :
12+ contents : read
13+ pages : write
14+ id-token : write
15+
16+ # Allow one concurrent deployment
17+ concurrency :
18+ group : " pages"
19+ cancel-in-progress : true
20+
21+ jobs :
22+ # Build job
23+ build :
24+ runs-on : ubuntu-latest
25+ steps :
26+ - name : Checkout
27+ uses : actions/checkout@v4
28+
29+ - name : Setup Node
30+ uses : actions/setup-node@v4
31+ with :
32+ node-version : " 20"
33+ cache : ' npm'
34+
35+ - name : Install dependencies
36+ run : npm install
37+
38+ - name : Build
39+ run : npm run build
40+
41+ - name : Upload artifact
42+ uses : actions/upload-pages-artifact@v3
43+ with :
44+ # Upload entire repository
45+ path : ' ./dist'
46+
47+ # Deployment job
48+ deploy :
49+ environment :
50+ name : github-pages
51+ url : ${{ steps.deployment.outputs.page_url }}
52+ needs : build
53+ runs-on : ubuntu-latest
54+ steps :
55+ - name : Deploy to GitHub Pages
56+ id : deployment
57+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments