Commit b3e934c 1 parent 3488636 commit b3e934c Copy full SHA for b3e934c
File tree 4 files changed +72
-1
lines changed
4 files changed +72
-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,9 +3,21 @@ import vue from '@vitejs/plugin-vue'
3
3
import { join } from 'path'
4
4
5
5
export default defineConfig ( {
6
+ base : './' ,
7
+ build : {
8
+ minify : false ,
9
+ rollupOptions : { } ,
10
+ } ,
6
11
resolve : {
7
12
// 直接使用源码
8
13
alias : [
14
+ {
15
+ find : 'vue' ,
16
+ replacement : join (
17
+ __dirname ,
18
+ '../node_modules/vue/dist/vue.esm-browser.js'
19
+ ) ,
20
+ } ,
9
21
{
10
22
find : 'vue-change-marker' ,
11
23
replacement : join ( __dirname , '../packages/core/index.ts' ) ,
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