File tree Expand file tree Collapse file tree 1 file changed +51
-0
lines changed
Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy to GitHub Pages
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout
14+ uses : actions/checkout@v4
15+
16+ - name : Setup Node.js
17+ uses : actions/setup-node@v4
18+ with :
19+ node-version : ' 18'
20+ cache : ' npm'
21+
22+ - name : Install dependencies
23+ run : npm ci
24+
25+ - name : Build
26+ run : npm run build
27+
28+ - name : Upload Pages artifact
29+ uses : actions/upload-pages-artifact@v3
30+ with :
31+ path : ./dist
32+
33+ deploy :
34+ needs : build
35+ runs-on : ubuntu-latest
36+ if : github.ref == 'refs/heads/main'
37+
38+ # Grant GITHUB_TOKEN the permissions required to make a Pages deployment
39+ permissions :
40+ pages : write # to deploy to Pages
41+ id-token : write # to verify the deployment originates from an appropriate source
42+
43+ # Deploy to the github-pages environment
44+ environment :
45+ name : github-pages
46+ url : ${{ steps.deployment.outputs.page_url }}
47+
48+ steps :
49+ - name : Deploy to GitHub Pages
50+ id : deployment
51+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments