Automating Docco Generation And Deployment To Heroku And Github
I got tired of manually typing “git push origin master” and “git push heroku master” to push changes in my BBCloneMail app up to Github and then deploy to Heroku. So I automated that with a rake task.
Then I got tired of the same 10 commands to generated new Docco docs for BBCloneMail and push that up to my Github `gh-pages`… so I automated that with a rake task, too.
The end result is 23 lines of rake tasks (including spaces and task definitions) to automate the updating of my project’s Docco documentation, push repository commits up to Github and then deploy to Heroku:
The only complexity in this is the process to update the Doco docs for the project. These commands ensure that the docs are built from the branch I’m currently on (which is always `master` for this project), but are only committed to the `gh-pages` branch, for the Github “Pages” feature. It also pushes the changes up to Github for me.
Now I just run `rake deploy` from the command line and everything is done for me. File this under “that was easy”.