File tree Expand file tree Collapse file tree 3 files changed +92
-27
lines changed Expand file tree Collapse file tree 3 files changed +92
-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+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - uses : actions/checkout@v4
15+
16+ - name : Setup node
17+ uses : actions/setup-node@v4
18+ with :
19+ node-version : 22
20+
21+ - name : Build
22+ run : |
23+ npm install
24+ npm run build
25+ rm -rf dist/*.map
26+
27+ - name : Upload GitHub Pages artifact
28+ 29+ with :
30+ path : ./dist
31+
32+ deploy :
33+ environment :
34+ name : github-pages
35+ url : ${{ steps.deployment.outputs.page_url }}
36+ runs-on : ubuntu-latest
37+ needs : build
38+ steps :
39+ - name : Deploy to GitHub Pages
40+ id : deployment
41+ uses : actions/deploy-pages@v4
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments