TravisCI: Run after_success on a specific branch

前端 未结 2 486
醉话见心
醉话见心 2021-02-12 07:41

I would like to know how to run an after_success script only for a specific branch.

I am using a custom script to deploy the app after build passes. I would

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-12 08:11

    You can also do this by using the script provider in the deploy phase of your build. This approach is a bit cleaner but only allows one command, unlike after_success.

    deploy:
      provider: script
      script: # some deployment script
      on:
        branch: prod
    

提交回复
热议问题