I've set up a Rails app with Heroku Pipelines to be able to automatically promote our staging environment to production. The workflow of master push -> CI run -> staging deploy -> production promote works really well for us.
Our assets are being distributed with Amazon Cloudfront. I setup separate distributions for the staging and production environment, which I configure in the environment:
# Environment variable configured per environment
config.action_controller.asset_host = ENV['ASSET_HOST']
One problem arises with this setup. Even though I configure the asset_host per environment, the assets are being precompiled in the staging environment and -- when promoting with Heroku Pipelines -- will be used in production as well. This causes issues with our custom fonts, CORS..
I thought about configuring a single Cloudfront distribution for multiple origins but could not figure it out. Also, I would really like to keep our current workflow since it enables CD for us.