File tree Expand file tree Collapse file tree 3 files changed +97
-27
lines changed Expand file tree Collapse file tree 3 files changed +97
-27
lines changed Original file line number Diff line number Diff line change 1+ name : test and deploy
2+
3+ on :
4+ push :
5+ branches : ["main"]
6+ pull_request :
7+ branches : ["main"]
8+
9+ jobs :
10+ test :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - name : Checkout repository
15+ uses : actions/checkout@v4
16+
17+ - name : Setup node
18+ uses : actions/setup-node@v4
19+ with :
20+ node-version : 22
21+
22+ - name : Install dependencies
23+ run : npm install
24+
25+ - name : Run unit tests
26+ run : npm run test
27+
28+ - name : Build
29+ run : |
30+ npm run build
31+ rm -rf dist/*.map
32+
33+ deploy :
34+ needs : test
35+ runs-on : ubuntu-latest
36+
37+ steps :
38+ - name : Checkout repository
39+ uses : actions/checkout@v4
40+
41+ - name : Setup node
42+ uses : actions/setup-node@v4
43+ with :
44+ node-version : 22
45+
46+ - name : Install dependencies
47+ run : npm install
48+
49+ - name : Build
50+ run : |
51+ npm run build
Original file line number Diff line number Diff line change 1+ name : Deploy chili3d to Pages
2+
3+ on :
4+ push :
5+ branches : [ "test" ]
6+ pull_request :
7+ branches : [ "test" ]
8+
9+ permissions :
10+ contents : read
11+ pages : write
12+ id-token : write
13+
14+ jobs :
15+ build :
16+ runs-on : ubuntu-latest
17+
18+ steps :
19+ - uses : actions/checkout@v4
20+
21+ - name : Setup node
22+ uses : actions/setup-node@v4
23+ with :
24+ node-version : 22
25+
26+ - name : Build
27+ run : |
28+ npm install
29+ npm run build
30+ rm -rf dist/*.map
31+
32+ - name : Upload GitHub Pages artifact
33+ 34+ with :
35+ path : ./dist
36+
37+ deploy :
38+ environment :
39+ name : github-pages
40+ url : ${{ steps.deployment.outputs.page_url }}
41+ runs-on : ubuntu-latest
42+ needs : build
43+ steps :
44+ - name : Deploy to GitHub Pages
45+ id : deployment
46+ uses : actions/deploy-pages@v4
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments