File tree 3 files changed +52
-3
lines changed
3 files changed +52
-3
lines changed Original file line number Diff line number Diff line change
1
+ on :
2
+ # Runs on pushes targeting the default branch
3
+ push :
4
+ branches : [$default-branch]
5
+
6
+ # Allows you to run this workflow manually from the Actions tab
7
+ workflow_dispatch :
8
+
9
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
10
+ permissions :
11
+ contents : read
12
+ pages : write
13
+ id-token : write
14
+
15
+ # Allow one concurrent deployment
16
+ concurrency :
17
+ group : " pages"
18
+ cancel-in-progress : true
19
+
20
+ jobs :
21
+ build :
22
+ runs-on : ubuntu-latest
23
+ steps :
24
+ - uses : actions/checkout@v4
25
+ # https://github.com/actions/configure-pages
26
+ - uses : actions/configure-pages@v2
27
+ # https://github.com/actions/setup-node#usage
28
+ - uses : actions/setup-node@v4
29
+ with :
30
+ node-version : 20
31
+ cache : npm
32
+
33
+ - run : npm ci
34
+ - run : npm run build
35
+ # https://github.com/actions/upload-pages-artifact
36
+ - uses : actions/upload-pages-artifact@v3
37
+ with :
38
+ path : " ./apps/browser-example/dist/"
39
+
40
+ deploy :
41
+ needs : build
42
+ environment :
43
+ name : github-pages
44
+ url : ${{ steps.deployment.outputs.page_url }}
45
+ runs-on : ubuntu-latest
46
+ steps :
47
+ # https://github.com/actions/deploy-pages & https://github.com/actions/starter-workflows/blob/main/pages/static.yml
48
+ - uses : actions/deploy-pages@v4
49
+ id : deployment
Original file line number Diff line number Diff line change 5
5
"type" : " module" ,
6
6
"scripts" : {
7
7
"dev" : " vite" ,
8
- "build" : " tsc -b && vite build" ,
9
- "clean" : " rm -rf node_modules" ,
8
+ "build" : " rm -rf dist ; tsc -b && vite build" ,
9
+ "clean" : " rm -rf node_modules; rm -rf dist " ,
10
10
"preview" : " vite preview"
11
11
},
12
12
"dependencies" : {
Original file line number Diff line number Diff line change 10
10
"type" : " module" ,
11
11
"scripts" : {
12
12
"dev" : " cd apps/react-example && npm run dev" ,
13
- "build" : " tsc --build " ,
13
+ "build" : " npm run build --workspaces " ,
14
14
"watch" : " tsc --build --watch" ,
15
15
"clean" : " rm -rf node_modules && npm run clean --workspaces"
16
16
},
You can’t perform that action at this time.
0 commit comments