Redeploy Heroku app without code changes

Normally setting a config var causes your application to be restarted. In most situations there should be no need to redeploy after doing this.

If you really do need to trigger a new deployment you can add a new empty commit, then push to Heroku again:

git commit --allow-empty -m "Trigger Heroku deploy after enabling collectstatic"
git push heroku master

The new empty commit is a regular commit. It has a hash, an author, a timestamp, etc. It will have the same tree as its parent. This should cause Heroku to build your app slug again using the same code as the previous commit.

It’s a bit awkward, but it works.

Leave a Comment