This script allows you to build your project with broccoli, add a new commit for your build (with a supplied message) and them push this to be deployed via Github Pages.
Before running this script you should have a clean git tree. Commit any changed files BEFORE running this script (you do not want to commit a build for files that haven't been commited yet).
Also note that this script is PRETTY fragile and focused on ONLY broccoli builds and pushing to GH-Pages. A similar approach could be used to send code to other sites and methods, but this may or may not be the best starting point.
To install this you will need to have the bash function in your terminal setup (.zshrc
, .bash-profile
, etc).
The suggested method is this:
- Open a new file called
~/gh-page.sh
in your editor:subl ~/gh-page.sh
- Paste the contents of the
gh-page.sh
file below into your new file - Open your
.zshrc
file with an editor:subl ~/.zshrc
- Add
source $HOME/gh-page.sh
to the bottom of this file - Reload your terminal configuration
source ~/.zshrc
NOTE if you use bash, you will want to do the same things as in
.zshrc
but in your.bash-profile
Now that you have installed this script you should be able to run gh-page-deploy
and pass an argument with your commit message for your build.
For instance:
gh-page-deploy "Build 0.0.1"