1 Star 1 Fork 0

曙光 / PoorStatistician

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
publish-gitee.sh 714 Bytes
一键复制 编辑 原始数据 按行查看 历史
曙光 提交于 2020-09-03 22:37 . add(politics): some updates
#!/bin/sh
if [ "`git status -s`" ]
then
echo "The working directory is dirty. Please commit any pending changes."
## exit 1;
fi
echo "Deleting old publication"
rm -rf public
mkdir public
git worktree prune
rm -rf .git/worktrees/public/
echo "Checking out gh-pages branch into public"
git worktree add -B gh-pages public upstream/gh-pages
echo "Removing existing files"
rm -rf public/*
echo "Generating site"
## hugo -D
hugo
echo "Updating gh-pages branch"
cd public && git add --all && git commit -m "Publishing to gh-pages (publish.sh)"
#echo "Pushing to github"
# git push --all
# git push --all gitee
git push --force-with-lease gitee gh-pages:gh-pages
# git push --force gitee gh-pages:gh-pages
1
https://gitee.com/shuguangS/PoorStatistician.git
git@gitee.com:shuguangS/PoorStatistician.git
shuguangS
PoorStatistician
PoorStatistician
master

搜索帮助