Skip to content

Instantly share code, notes, and snippets.

@wesleyhales
Created March 30, 2013 00:01
Show Gist options
  • Save wesleyhales/5274512 to your computer and use it in GitHub Desktop.
Save wesleyhales/5274512 to your computer and use it in GitHub Desktop.
bash script for taking a static awestruct build and pushing it to a repo
export REPO="$(pwd | sed s,^/home/travis/build/,,g)"
echo -e "Current Repo:$REPO --- Travis Branch:$TRAVIS_BRANCH"
#Set git user
git config --global user.email "[email protected]"
git config --global user.name "Travis"
#Set upstream remote
git remote add upstream https://${GH_TOKEN}@github.com/wesleyhales/wesleyhales.com.git > /dev/null
git remote add live https://${GH_TOKEN}@github.com/wesleyhales/wesleyhales.github.com > /dev/null
mkdir $HOME/temp_wesleyhales
git clone https://${GH_TOKEN}@github.com/wesleyhales/wesleyhales.github.com $HOME/temp_wesleyhales
cp -rf _site/* $HOME/temp_wesleyhales/
cd $HOME/temp_wesleyhales
git add -f .
git commit -m "add new site content"
git push https://${GH_TOKEN}@github.com/wesleyhales/wesleyhales.github.com master > /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment