Skip to content

Instantly share code, notes, and snippets.

@aoswalt
Last active August 15, 2016 16:05
Show Gist options
  • Save aoswalt/767fe4c8723b5c8dbea0b466f43e3773 to your computer and use it in GitHub Desktop.
Save aoswalt/767fe4c8723b5c8dbea0b466f43e3773 to your computer and use it in GitHub Desktop.
Basic script to deploy public folder to gh-pages branch
#! /bin/sh
git checkout -b gh-temp
gulp build
echo '!public' >> .gitignore
git add -A
git commit -m "lib for gh-pages"
git subtree split --prefix public -b gh-pages
git push origin gh-pages --force
git checkout master
git branch -D gh-temp
git branch -D gh-pages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment