1 Star 0 Fork 13

pinefire/spring-boot-tutorial

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
deploy.sh 1.16 KB
一键复制 编辑 原始数据 按行查看 历史
turnon 提交于 2022-06-14 07:03 +08:00 . feat: 更新配置
#!/usr/bin/env sh
# ------------------------------------------------------------------------------
# gh-pages 部署脚本
# @author Zhang Peng
# @since 2020/2/10
# ------------------------------------------------------------------------------
# 装载其它库
ROOT_DIR=$(
cd $(dirname $0)/..
pwd
)
# 确保脚本抛出遇到的错误
set -e
# 生成静态文件
npm run build
# 进入生成的文件夹
cd ${ROOT_DIR}/docs/.temp
# 如果是发布到自定义域名
# echo 'www.example.com' > CNAME
if [[ ${GITHUB_TOKEN} && ${GITEE_TOKEN} ]]; then
msg='自动部署'
GITHUB_URL=https://dunwu:${GITHUB_TOKEN}@github.com/dunwu/spring-boot-tutorial.git
GITEE_URL=https://turnon:${GITEE_TOKEN}@gitee.com/turnon/spring-boot-tutorial.git
git config --global user.name "dunwu"
git config --global user.email "forbreak@163.com"
else
msg='手动部署'
GITHUB_URL=git@github.com:dunwu/spring-boot-tutorial.git
GITEE_URL=git@gitee.com:turnon/spring-boot-tutorial.git
fi
git init
git add -A
git commit -m "${msg}"
# 推送到github gh-pages分支
git push -f "${GITHUB_URL}" master:gh-pages
git push -f "${GITEE_URL}" master:gh-pages
cd -
rm -rf ${ROOT_DIR}/docs/.temp
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/pinefire/spring-boot-tutorial.git
git@gitee.com:pinefire/spring-boot-tutorial.git
pinefire
spring-boot-tutorial
spring-boot-tutorial
master

搜索帮助