2 Star 1 Fork 9

刘亚平 / vuepress-theme-vdoing

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
deploy.sh 1.40 KB
一键复制 编辑 原始数据 按行查看 历史
dengwei 提交于 2021-09-23 10:46 . feat: 半自动部署方案
#!/usr/bin/env sh
# 确保脚本抛出遇到的错误
set -e
# 生成静态文件
npm run build
echo '构建完成'
# 进入生成的文件夹
cd docs/.vuepress/dist
zip -r blogs.zip *
echo '压缩完成'
scp -r blogs.zip root@139.9.223.238:/www/blogs
echo '成功推送到服务器'
# deploy to github pages
# echo 'b.xugaoyi.com' > CNAME
# if [ -z "$GITHUB_TOKEN" ]; then
# msg='deploy'
# githubUrl=git@github.com:xugaoyi/vuepress-theme-vdoing.git
# else
# msg='来自github actions的自动部署'
# githubUrl=https://xugaoyi:${GITHUB_TOKEN}@github.com/xugaoyi/vuepress-theme-vdoing.git
# git config --global user.name "xugaoyi"
# git config --global user.email "894072666@qq.com"
# fi
# git init
# git add -A
# git commit -m "${msg}"
# git push -f $githubUrl master:gh-pages # 推送到github gh-pages分支
# deploy to coding pages
# echo 'www.xugaoyi.com\nxugaoyi.com' > CNAME # 自定义域名
# echo 'google.com, pub-7828333725993554, DIRECT, f08c47fec0942fa0' > ads.txt # 谷歌广告相关文件
# if [ -z "$CODING_TOKEN" ]; then # -z 字符串 长度为0则为true;$CODING_TOKEN来自于github仓库`Settings/Secrets`设置的私密环境变量
# codingUrl=git@e.coding.net:xgy/xgy.git
# else
# codingUrl=https://HmuzsGrGQX:${CODING_TOKEN}@e.coding.net/xgy/xgy.git
# fi
# git add -A
# git commit -m "${msg}"
# git push -f $codingUrl master # 推送到coding
# cd -
# rm -rf docs/.vuepress/dist
1
https://gitee.com/liuyaping007/vuepress-theme-vdoing.git
git@gitee.com:liuyaping007/vuepress-theme-vdoing.git
liuyaping007
vuepress-theme-vdoing
vuepress-theme-vdoing
master

搜索帮助