Skip to content

Instantly share code, notes, and snippets.

@sbussard
Last active July 12, 2016 00:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sbussard/c97d5aa7ec5adddf6da3570ef9f163d3 to your computer and use it in GitHub Desktop.
Save sbussard/c97d5aa7ec5adddf6da3570ef9f163d3 to your computer and use it in GitHub Desktop.
push build output to github pages
#!/usr/bin/env bash
BUILD_DIR=build
git checkout -b _build_staging_
git add -f $BUILD_DIR
git commit -am add_build_ouput
git subtree split --prefix $BUILD_DIR -b gh-pages
git push origin gh-pages -f
git checkout -
git branch -D gh-pages _build_staging_
@sbussard
Copy link
Author

CAUTION: this will delete your gh-pages branch if you have one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment