-
-
Save ryanlid/2a5c496e38491ab90fae86ad1fc0a5aa to your computer and use it in GitHub Desktop.
Hexo Travis CI settings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -ev | |
export TZ='Asia/Shanghai' | |
# 先 clone 再 commit,避免直接 force commit | |
git clone -b gh-pages https://github.com/ryanlid/blog.git .deploy_git | |
cd .deploy_git | |
git checkout gh-pages | |
mv .git/ ../public/ | |
cd ../public | |
git add . | |
git commit -m "Site updated: `date +"%Y-%m-%d %H:%M:%S"`" | |
git push --quiet --force https://$REPO_TOKEN@github.com/ryanlid/blog gh-pages:gh-pages |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
相关 gist
https://gist.github.com/cb1e1aca4f2914b2f550599dc09510d9
相关仓库文件
https://github.com/ryanlid/blog/blob/master/.travis/deploy.sh