Git workflow with Octopress on Heroku
Question
I want to deploy an Octopress blog on Heroku. The problem is that this requires to add the "public" directory (containing the compiled stuff) under VCS. But for my general workflow I don't want to track this directory. So what can should I do to:
- Track the changes to source and config files and push this to GitHub.
- Push the generated blog to Heroku.
- Keep Octopress updatable (see http://octopress.org/docs/updating/)
I am new to Heroku and Octopress, so please be detailed in your answer.
Solution
The standard method for deploying Octopress to heroku is to commit and deploy the public directory. I agree that this isn't ideal because tracking generated assets is generally a bad practice. However, since this is a static site, being able to deploy static assets makes it easier to deploy your blog anywhere since you won't depend on a remote server being configured to generate your blog for you.
That being said, there are some folks who are pioneering with build-packs and Heroku's cedar stack. You can follow their work here. http://jasongarber.com/blog/2012/01/10/deploying-octopress-to-heroku-with-a-custom-buildpack
I haven't attempted this method but many have reported success using it. If you have trouble, please contact the author as I'm sure they will be more able to assist you.