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:

  1. Track the changes to source and config files and push this to GitHub.
  2. Push the generated blog to Heroku.
  3. Keep Octopress updatable (see http://octopress.org/docs/updating/)

I am new to Heroku and Octopress, so please be detailed in your answer.

Was it helpful?

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top