How to prevent git push heroku master?

Viewed 671

My workflow encompasses the following steps:

  1. Git push (to BitBucket or GitHub depending on the project).

  2. BitBucket/GitHub is integrated with CodeShip, tests are run.

  3. If tests are ok, CodeShip automatically deploys to Heroku.

Everything works fine when, by pushing to the remote repo, the deployment tasks are triggered which ends up with the new version going live when everything is ok.

My question is:

Sometimes, I simply do a git push heroku master which defeats the whole purpose of this workflow.

How can I prevent it from happening? Is there a way to make Heroku only accept the deploy when the source is CodeShip?

2 Answers

You could just create another branch called dev and push to that branch your changes and when you are ready to deploy to heroku merge changes into master branch.

I just came accross your issue and this is what i did as quickest resolution

Related