代码拉取完成,页面将自动刷新
#!/bin/bash
set -e
if [ -z "$(git status --porcelain)" ]; then
# Working directory clean
echo "Working directory clean"
else
# Uncommitted changes
read -p "You got uncommitted changes, press y to continue? " -n 1 -r
echo # (optional) move to a new line
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
echo "Skiped!"
[[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1 # handle exits from shell or function but don't exit interactive shell
fi
fi
rm -rf gh-pages
fis3 release gh-pages -c
node ./upload2cdn.js $1
git add gh-pages -f
git commit -m "更新 gh-pages"
git push
git subtree push --prefix gh-pages origin gh-pages
git commit -m 'rebuild pages' --allow-empty
git push origin
echo "done"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。