I am working on a web app, hosting the source code on Github and running the app on Heroku. Everything works fine, but I have on issue I can't wrap my head around. Before the deploying my code, I run some scripts to optimize the code (minifying, concatenating files etc.). The heroku app only uses the optimized version of the app.
Basically, I have two folders: dev
and production
. Dev
contains the source code I write, production
is produced by my build scripts (I use grunt and requirejs). Currently, both folders are in my Git repository and both are pushed to Github and Heroku. What I'd rather like is to only have dev
on Github and only production
on Heroku.
I read some articles how to setup different branches for Heroku, as described in this blog. Could I setup a production branch and only have the production
folder in there while keeping the dev
folder to my master branch? Or would I need separate repositories?
Has anyone tried something similar? I would assume that this is not something out of the ordinary.