Skip to content

Instantly share code, notes, and snippets.

@xcambar
Last active December 15, 2015 09:09
Show Gist options
  • Save xcambar/5236620 to your computer and use it in GitHub Desktop.
Save xcambar/5236620 to your computer and use it in GitHub Desktop.
ZSH Function to deploy to Github Pages
#
# Usage:
# ghp BUILD_DIR GIT_REPO_URL
#
function ghp () {
cd $0
git init
git add -A
git remote add origin $1
git commit -m "Generated at $(date)"
git push origin master:gh-pages
rm -fr .git
echo "Successful Deploy"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment