deployToCoding

This commit is contained in:
xugaoyi 2019-12-17 17:16:41 +08:00
parent 54117504ea
commit e679adf66d
3 changed files with 14 additions and 3 deletions

View File

@ -29,5 +29,4 @@ jobs: # 工作流
BASE_BRANCH: master # 要部署的文件夹所在的分支. BASE_BRANCH: master # 要部署的文件夹所在的分支.
BRANCH: gh-pages # 部署到的分支 BRANCH: gh-pages # 部署到的分支
FOLDER: docs/.vuepress/dist # 要部署的文件夹. FOLDER: docs/.vuepress/dist # 要部署的文件夹.
BUILD_SCRIPT: npm install && npm run build && cd docs/.vuepress/dist && echo 'b.evanblogweb.com' > CNAME && cd - # 部署前要执行的命令,记得进入某个目录后要后面要退回开始的目录 BUILD_SCRIPT: npm install && npm run build && npm run deployToCoding && cd docs/.vuepress/dist && echo 'b.evanblogweb.com' > CNAME && cd - # 部署前要执行的命令,记得进入某个目录后要后面要退回开始的目录
#

11
deployToCoding.sh Normal file
View File

@ -0,0 +1,11 @@
#!/usr/bin/env sh
set -e
cd docs/.vuepress/dist
echo 'evanblogweb.com\nwww.evanblogweb.com' > CNAME
git init
git add -A
git commit -m 'deploy'
git push -f git@git.dev.tencent.com:xugaoyi/xugaoyi.git master
cd -

View File

@ -5,7 +5,8 @@
"dev": "vuepress dev docs", "dev": "vuepress dev docs",
"list": "node utils/getFilenames.js", "list": "node utils/getFilenames.js",
"build": "vuepress build docs", "build": "vuepress build docs",
"deploy": "bash deploy.sh" "deploy": "bash deploy.sh",
"deployToCoding": "bash deployToCoding.sh"
}, },
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {