File tree Expand file tree Collapse file tree 4 files changed +63
-1
lines changed
Expand file tree Collapse file tree 4 files changed +63
-1
lines changed 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+ permissions :
10+ contents : read
11+ pages : write
12+ id-token : write
13+
14+ concurrency :
15+ group : " pages"
16+ cancel-in-progress : false
17+
18+ jobs :
19+ deploy :
20+ environment :
21+ name : github-pages
22+ url : ${{ steps.deployment.outputs.page_url }}
23+ runs-on : ubuntu-latest
24+ steps :
25+ - name : Checkout
26+ uses : actions/checkout@v4
27+
28+ - name : Setup Node
29+ uses : actions/setup-node@v4
30+ with :
31+ node-version : lts/*
32+
33+ - name : Install pnpm
34+ uses : pnpm/action-setup@v4
35+ with :
36+ version : 9
37+
38+ - name : Install dependencies
39+ run : pnpm install
40+
41+ - name : Build example
42+ run : pnpm build:example
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 : " distExample"
51+
52+ - name : Deploy to GitHub Pages
53+ id : deployment
54+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change 66# Dist
77node_modules
88dist /
9+ distExample /
910
1011# IDE
1112.vscode /*
Original file line number Diff line number Diff line change 2727 ],
2828 "scripts" : {
2929 "build" : " rslib build" ,
30+ "build:example" : " rsbuild build" ,
31+ "preview:example" : " rsbuild preview --open" ,
3032 "dev" : " rsbuild dev --open" ,
3133 "semantic-release" : " semantic-release"
3234 },
5052 "react" : " >=16.9.0" ,
5153 "react-dom" : " >=16.9.0"
5254 }
53- }
55+ }
Original file line number Diff line number Diff line change @@ -8,4 +8,9 @@ export default defineConfig({
88 index : './example/index.tsx' ,
99 } ,
1010 } ,
11+ output : {
12+ distPath : {
13+ root : 'distExample' ,
14+ } ,
15+ } ,
1116} ) ;
You can’t perform that action at this time.
0 commit comments