File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy to GitHub Pages
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ workflow_dispatch :
8+
9+ concurrency :
10+ group : pages-${{ github.ref }}
11+ cancel-in-progress : true
12+
13+ env :
14+ MAX_RUNTIME_MINUTES : 10
15+
16+ jobs :
17+ build-and-deploy :
18+ runs-on : ubuntu-latest
19+
20+ timeout-minutes : 10
21+
22+ steps :
23+ - name : Checkout repository
24+ uses : actions/checkout@v4
25+ with :
26+ fetch-depth : 1
27+
28+ - name : Setup Node.js
29+ uses : actions/setup-node@v4
30+ with :
31+ node-version : ' 20'
32+ cache : ' npm'
33+
34+ - name : Install dependencies
35+ run : npm ci
36+ timeout-minutes : 5
37+
38+ - name : Build project
39+ run : npm run build
40+ timeout-minutes : 5
41+ env :
42+ NODE_ENV : production
43+
44+ - name : Setup Pages
45+ uses : actions/configure-pages@v4
46+
47+ - name : Upload artifact
48+ uses : actions/upload-pages-artifact@v3
49+ with :
50+ path : ' ./docs'
51+
52+ - name : Deploy to GitHub Pages
53+ id : deployment
54+ uses : actions/deploy-pages@v4
55+
56+ permissions :
57+ contents : read
58+ pages : write
59+ id-token : write
You can’t perform that action at this time.
0 commit comments