Skip to content

Commit

Permalink
build: 修改构建方式
Browse files Browse the repository at this point in the history
  • Loading branch information
dunwu committed Jan 24, 2024
1 parent c946f6a commit 8934acd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,24 @@ cd ${ROOT_DIR}/docs/.temp
# 如果是发布到自定义域名
# echo 'www.example.com' > CNAME

if [[ ${GITHUB_TOKEN} && ${GITEE_TOKEN} ]]; then
#if [[ ${GITHUB_TOKEN} && ${GITEE_TOKEN} ]]; then
if [[ ${GITHUB_TOKEN} ]]; then
msg='自动部署'
GITHUB_URL=https://dunwu:${GITHUB_TOKEN}@github.com/dunwu/java-tutorial.git
GITEE_URL=https://turnon:${GITEE_TOKEN}@gitee.com/turnon/java-tutorial.git
# GITEE_URL=https://turnon:${GITEE_TOKEN}@gitee.com/turnon/java-tutorial.git
git config --global user.name "dunwu"
git config --global user.email "[email protected]"
else
msg='手动部署'
[email protected]:dunwu/java-tutorial.git
[email protected]:turnon/java-tutorial.git
# [email protected]:turnon/java-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
#git push -f "${GITEE_URL}" master:gh-pages

cd -
rm -rf ${ROOT_DIR}/docs/.temp

0 comments on commit 8934acd

Please sign in to comment.