Deploy github

This commit is contained in:
FairyEver 2019-12-14 10:55:54 +08:00
parent ea833d4b3a
commit 94e47f8888
3 changed files with 33 additions and 0 deletions

13
.env.github Normal file
View File

@ -0,0 +1,13 @@
# 构建预览页面
# 指定构建模式
NODE_ENV=production
# 标记当前构建方式
VUE_APP_BUILD_MODE=PREVIEW
# 显示源码按钮
VUE_APP_SCOURCE_LINK=TRUE
# 部署路径
VUE_APP_PUBLIC_PATH=/

19
.github/workflows/deploy-github.yml vendored Normal file
View File

@ -0,0 +1,19 @@
name: Deploy github
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Build and Deploy
uses: JamesIves/github-pages-deploy-action@master
env:
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: dist
BUILD_SCRIPT: npm install && npm run build:github

View File

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