Created
March 3, 2015 04:56
-
-
Save coopermaruyama/1b5506a31b4b6a69651b to your computer and use it in GitHub Desktop.
Deploy Jekyll build (_site) to github pages (assumes you're using master branch rather than gh-pages)
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/sh | |
# To use: | |
# 1. save this file as /usr/bin-git-jekyll-deploy then `sudo chmod 775 /usr/bin/git-jekyll-deploy` | |
# 2. create a "source" branch where you'll maintain your jekyll site: git branch -b source | |
# 3. run `jekyll build` | |
# 4. run `git add . && git commit -am "update content"` | |
git branch -D master | |
git checkout -b master | |
git checkout source | |
git push origin `git subtree split --prefix _site master`:master --force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment