I’m working on a static site/web app right now that is being built with CoffeeScript, SASS, and a few other preprocessors. I’ve set up a Rakefile to easily build both a test and production version of the site (compiles code, minifies, copies static assets, etc). Ultimately the site will wind up just being HTML/CSS/JS + assets (no DB or server-side processing needed for this particular project).
I’d like to start using Heroku as a test server, and possibly the production server as well, since Heroku can easily be set up to serve static sites via Rack.
My issue is that right now I don’t include the build version of the site in my Git repo, only the source. Since Heroku deployment is via Git, that means that I’m not publishing my actual site to Heroku, only my source files.
Normally, I’d never include a “build” folder in a Git repo, but now I’m wondering if it is the best solution for this site.
Thoughts?
If you’re using Cedar, and have some sort of rake task that will build your site, then you don’t need to check it in, but you will probably need to look at some sort of buildpack to get it done as you’ll need to run the build as part of the deploy.
Have a look at the various things out there like Nesta and Jekyll that people are using to create static sites.