init
This commit is contained in:
parent
e328dfd937
commit
e5c79b5883
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
# 确保脚本抛出遇到的错误
|
||||
set -e
|
||||
|
||||
# 生成静态文件
|
||||
#npm run docs:build
|
||||
npm run build
|
||||
|
||||
# 进入生成的文件夹
|
||||
cd docs/.vuepress/dist
|
||||
|
||||
# 如果是发布到自定义域名
|
||||
echo 'www.evanblogweb.com' > CNAME
|
||||
|
||||
git init
|
||||
git add -A
|
||||
git commit -m 'deploy'
|
||||
|
||||
# 如果发布到 https://<USERNAME>.github.io
|
||||
# git push -f git@github.com:<USERNAME>/<USERNAME>.github.io.git master
|
||||
|
||||
# 如果发布到 https://<USERNAME>.github.io/<REPO>
|
||||
# git push -f git@github.com:<USERNAME>/<REPO>.git master:gh-pages
|
||||
|
||||
git push -f git@github.com:xugaoyi/evanblog.git master:gh-pages
|
||||
|
||||
cd -
|
||||
|
|
@ -7,7 +7,8 @@
|
|||
"build": "vuepress build docs && node utils/bd_hm.js",
|
||||
"build:gitpage": "export VUEPRESS_BASE=/evanblog/|| set VUEPRESS_BASE=/evanblog/&&vuepress build docs && node utils/bd_hm.js",
|
||||
"push:gitpage": "push-dir --dir=docs/.vuepress/dist --branch=gh-pages --allow-unclean",
|
||||
"chame:gitpage": "cd docs/.vuepress/dist && echo 'www.evanblogweb.com' > CNAME"
|
||||
"chame:gitpage": "cd docs/.vuepress/dist && echo 'www.evanblogweb.com' > CNAME",
|
||||
"deploy": "bash deploy.sh"
|
||||
},
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
|
|
|
|||
Loading…
Reference in New Issue