I would deploy them separately, and keep them in separate git repos.
Ember
Use ember-cli-deploy. I would suggest you look into the ember-cli-deploy-lightning-pack. There is a presentation about it here.
This automates the release process -
- Builds your Ember app, with asset fingerprints
- gzips the assets
- Uploads changed files to AWS S3
- Puts the full content of your
index.html
into Redis
Rails
- deploy your rails-api app to heroku normally
- include a redis addon
- set up the route which serves index.html to query it directly from Redis instead
- I would suggest aliasing all non-api routes (ie a catchall route) to the root route so you can 'deep link' to your ember app
A big advantage of this process is that you can deploy changes to your frontend very quickly, and without having to take down or restart the server.