File tree Expand file tree Collapse file tree 3 files changed +17
-5
lines changed Expand file tree Collapse file tree 3 files changed +17
-5
lines changed Original file line number Diff line number Diff line change 55
55
- name : Test
56
56
run : yarn test
57
57
58
- - name : Docs build
58
+ - name : Build docs with webpack
59
59
run : yarn docs:build
60
+ env :
61
+ DOCS_BUNDLER : ' @vuepress/webpack'
62
+
63
+ # TODO: vite will statically replace global defined constants even in markdown files
64
+ # - name: Build docs with vite
65
+ # run: yarn docs:build
66
+ # env:
67
+ # DOCS_BUNDLER: '@vuepress/vite'
Original file line number Diff line number Diff line change 11
11
runs-on : ubuntu-latest
12
12
13
13
env :
14
- GA_ID : G-CTB8FQ7VMW
14
+ DOCS_GA_ID : G-CTB8FQ7VMW
15
15
NODE_VERSION : ' 14'
16
16
17
17
steps :
Original file line number Diff line number Diff line change @@ -65,8 +65,11 @@ export default defineUserConfig<DefaultThemeOptions>({
65
65
} ,
66
66
} ,
67
67
68
- // use vite in dev, use webpack in prod
69
- bundler : isProd ? '@vuepress/webpack' : '@vuepress/vite' ,
68
+ bundler :
69
+ // specify bundler via environment variable
70
+ process . env . DOCS_BUNDLER ??
71
+ // use vite in dev, use webpack in prod
72
+ ( isProd ? '@vuepress/webpack' : '@vuepress/vite' ) ,
70
73
71
74
themeConfig : {
72
75
logo : '/images/hero.png' ,
@@ -157,7 +160,8 @@ export default defineUserConfig<DefaultThemeOptions>({
157
160
[
158
161
'@vuepress/plugin-google-analytics' ,
159
162
{
160
- id : process . env . GA_ID ,
163
+ // we have multiple deployments, which would use different id
164
+ id : process . env . DOCS_GA_ID ,
161
165
} ,
162
166
] ,
163
167
[ '@vuepress/plugin-pwa' ] ,
You can’t perform that action at this time.
0 commit comments