Commit 44137e6 1 parent 3488636 commit 44137e6 Copy full SHA for 44137e6
File tree 4 files changed +61
-1
lines changed
4 files changed +61
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy example to Pages
2
+
3
+ on :
4
+ push :
5
+ branches : ["main"]
6
+
7
+ workflow_dispatch :
8
+
9
+ permissions :
10
+ contents : read
11
+ pages : write
12
+ id-token : write
13
+
14
+ # Allow one concurrent deployment
15
+ concurrency :
16
+ group : " pages"
17
+ cancel-in-progress : true
18
+
19
+ jobs :
20
+ deploy :
21
+ environment :
22
+ name : github-pages
23
+ url : ${{ steps.deployment.outputs.page_url }}
24
+ runs-on : ubuntu-latest
25
+ steps :
26
+ - name : Checkout
27
+ uses : actions/checkout@v4
28
+
29
+ - name : Install pnpm
30
+ uses : pnpm/action-setup@v2
31
+ with :
32
+ version : 8
33
+
34
+ - name : Use Node.js 20
35
+ uses : actions/setup-node@v4
36
+ with :
37
+ node-version : 20
38
+ cache : pnpm
39
+
40
+ - name : Install Dependencies
41
+ run : pnpm install
42
+
43
+ - name : Build
44
+ run : pnpm run build:example
45
+
46
+ - name : Setup Pages
47
+ uses : actions/configure-pages@v4
48
+
49
+ - name : Upload artifact
50
+ uses : actions/upload-pages-artifact@v3
51
+ with :
52
+ # Upload dist folder
53
+ path : " ./examples/dist"
54
+
55
+ - name : Deploy to GitHub Pages
56
+ id : deployment
57
+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change 4
4
"version" : " 0.0.0" ,
5
5
"type" : " module" ,
6
6
"scripts" : {
7
- "dev" : " vite"
7
+ "dev" : " vite" ,
8
+ "build" : " vite build --mode development"
8
9
}
9
10
}
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import vue from '@vitejs/plugin-vue'
3
3
import { join } from 'path'
4
4
5
5
export default defineConfig ( {
6
+ base : './' ,
6
7
resolve : {
7
8
// 直接使用源码
8
9
alias : [
Original file line number Diff line number Diff line change 6
6
"scripts" : {
7
7
"dev" : " pnpm run -C examples dev" ,
8
8
"build" : " pnpm run --filter=./packages/core build" ,
9
+ "build:example" : " pnpm run -C examples build" ,
9
10
"changeset" : " changeset" ,
10
11
"vp" : " changeset version" ,
11
12
"release" : " changeset publish"
You can’t perform that action at this time.
0 commit comments