Laravel Forge Deployment upon successful build

circle.yml
2.0

#1

I’m pretty new to CircleCI and for some reason I just can’t wrap my head around how to call a webhook only on successful build of the master branch with CircleCI 2.0. Currently I am using a script to verify that the PHPUnit test passed or failed then I call the forge webhook upon success. This works fine but doesn’t prevent the deployment hook from happening if it’s a branch other than master.

        - run:
        name: Run PHPUnit tests and deploy
        command: bash .circleci/deploy.sh

What I would like to do is something like this.

- run:
      name: Run PHPUnit tests
      command: ./vendor/bin/phpunit

then IF the build is successful AND the branch is master then perform a wget/curl on the webhook url. I am sure this is something simple. Thanks for any answers on this.


#2

Possible duplicate of:


#3

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.