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+ # Simple workflow for deploying static content to GitHub Pages
2+ name : Deploy static content to Pages
3+
4+ on :
5+ # Runs on pushes targeting the default branch
6+ push :
7+ branches : ["main"]
8+ pull_request :
9+ branches :
10+ - ' *'
11+
12+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+
14+
15+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
16+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
17+ concurrency :
18+ group : " pages"
19+ cancel-in-progress : false
20+
21+ jobs :
22+ build :
23+ runs-on : ubuntu-latest
24+ steps :
25+ - name : Checkout
26+ uses : actions/checkout@v4
27+ - name : Setup Node.js
28+ uses : actions/setup-node@v4
29+ with :
30+ node-version : 20
31+ - name : Install the dependencies
32+ run : npm ci
33+ - name : Build
34+ run : npm run build
35+ - name : Upload artifact
36+ uses : actions/upload-pages-artifact@v3
37+ with :
38+ path : ./build
39+
40+ deploy :
41+ needs : build
42+ if : github.ref == 'refs/heads/main'
43+ environment :
44+ name : github-pages
45+ url : ${{ steps.deployment.outputs.page_url }}
46+ runs-on : ubuntu-latest
47+ permissions :
48+ contents : read
49+ pages : write
50+ id-token : write
51+ steps :
52+ - name : Deploy to GitHub Pages
53+ id : deployment
54+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments