I have a project that uses Serve and is version controlled using Git. Serve creates an output
folder with static files that I want to deploy to Heroku.
I don't want to deploy the Serve project itself since the Heroku Cedar stack doesn't seem too fond of it, but most importantly I want to take advantage of Heroku's great support for static websites.
Is there a way to deploy a subfolder to a git remote?
Should I create a Git repo in the output
folder (that sounds wrong) and push that to Heroku?
There's an even easier way via git-subtree. Assuming you want to push your folder 'output' as the root to Heroku, you can do:
git subtree push --prefix output heroku master
It appears currently that git-subtree is being included into git-core, but I don't know if that version of git-core has been released yet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With