Created
August 30, 2015 22:06
-
-
Save tongueroo/01fff8bf1fc5f791f367 to your computer and use it in GitHub Desktop.
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 -x | |
set -e | |
# Setup git so we can use it | |
git config --global user.email "tongueroo@gmail.com" | |
git config --global user.name "CircleCI build_html script" | |
# remove changes from current gh-pages-ci branch | |
git checkout -f | |
git checkout master | |
# Make sure that local master matches with remote master | |
# CircleCI merges made changes to master so need to reset it | |
git fetch origin master | |
git reset --hard origin/master | |
# Gets _site/* files and pushes them to master branch | |
# Note: CircleCI creates vendor and .bundle files | |
mv _site /tmp/ | |
rm -rf * .bundle .sass-cache | |
mv /tmp/_site/* . | |
git add -A . | |
git commit -m "CircleCI build_html: copy _site files that was generated from gh-pages-ci branch" | |
git push origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment