ci: build:preview

This commit is contained in:
FairyEver 2020-04-18 18:30:43 +08:00
parent abeaf0dd15
commit bcf156aad8
3 changed files with 4 additions and 10 deletions

View File

@ -17,8 +17,6 @@ jobs:
shell: bash shell: bash
run: | run: |
echo -e "\ echo -e "\
VUE_APP_BUILD_MODE=PREVIEW\n\
VUE_APP_SCOURCE_LINK=TRUE\n\
VUE_APP_PUBLIC_PATH=/d2-admin/preview/\ VUE_APP_PUBLIC_PATH=/d2-admin/preview/\
" > .env.local " > .env.local
cat .env.local | while read line cat .env.local | while read line
@ -26,7 +24,7 @@ jobs:
echo $line echo $line
done done
- name: Build - name: Build
run: yarn build --report run: yarn build:preview --report
- name: CDN download qshell - name: CDN download qshell
run: | run: |
wget http://devtools.qiniu.com/qshell-linux-x86-v2.4.0.zip wget http://devtools.qiniu.com/qshell-linux-x86-v2.4.0.zip
@ -61,8 +59,6 @@ jobs:
shell: bash shell: bash
run: | run: |
echo -e "\ echo -e "\
VUE_APP_BUILD_MODE=PREVIEW\n\
VUE_APP_SCOURCE_LINK=TRUE\n\
VUE_APP_PUBLIC_PATH=/d2-admin/preview/\ VUE_APP_PUBLIC_PATH=/d2-admin/preview/\
" > .env.local " > .env.local
cat .env.local | while read line cat .env.local | while read line
@ -70,7 +66,7 @@ jobs:
echo $line echo $line
done done
- name: Build - name: Build
run: yarn build --report run: yarn build:preview --report
- name: Deploy - name: Deploy
uses: SamKirkland/FTP-Deploy-Action@2.0.0 uses: SamKirkland/FTP-Deploy-Action@2.0.0
env: env:
@ -93,8 +89,6 @@ jobs:
shell: bash shell: bash
run: | run: |
echo -e "\ echo -e "\
VUE_APP_BUILD_MODE=PREVIEW\n\
VUE_APP_SCOURCE_LINK=TRUE\n\
VUE_APP_PUBLIC_PATH=/d2-admin/\ VUE_APP_PUBLIC_PATH=/d2-admin/\
" > .env.local " > .env.local
cat .env.local | while read line cat .env.local | while read line
@ -102,7 +96,7 @@ jobs:
echo $line echo $line
done done
- name: Build - name: Build
run: yarn build --report run: yarn build:preview --report
- name: Deploy - name: Deploy
uses: peaceiris/actions-gh-pages@v2 uses: peaceiris/actions-gh-pages@v2
env: env:

View File

@ -7,7 +7,7 @@
"dev": "npm run serve", "dev": "npm run serve",
"build": "vue-cli-service build", "build": "vue-cli-service build",
"build:nomock": "vue-cli-service build --mode nomock", "build:nomock": "vue-cli-service build --mode nomock",
"build:netlify": "NODE_OPTIONS=--max_old_space_size=4096 vue-cli-service build --mode netlify", "build:preview": "NODE_OPTIONS=--max_old_space_size=4096 vue-cli-service build --mode preview",
"lint": "vue-cli-service lint --fix", "lint": "vue-cli-service lint --fix",
"test:unit": "vue-cli-service test:unit", "test:unit": "vue-cli-service test:unit",
"i18n:report": "vue-cli-service i18n:report --src './src/**/*.?(js|vue)' --locales './src/locales/**/*.json'", "i18n:report": "vue-cli-service i18n:report --src './src/**/*.?(js|vue)' --locales './src/locales/**/*.json'",