Deploy github
This commit is contained in:
13
.env.github
Normal file
13
.env.github
Normal 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
19
.github/workflows/deploy-github.yml
vendored
Normal 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
|
||||||
@@ -7,6 +7,7 @@
|
|||||||
"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:preview": "NODE_OPTIONS=--max_old_space_size=4096 vue-cli-service build --mode preview",
|
"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",
|
"dev": "npm run serve",
|
||||||
"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'",
|
||||||
"start": "npm run serve",
|
"start": "npm run serve",
|
||||||
|
|||||||
Reference in New Issue
Block a user