I am trying to get Travis-CI to automatically deploy a successful tagged build to Heroku. Below is my .travis.yml setup:

deploy:
  provider: heroku
  strategy: git
  run:
    - "rake db:migrate"
    - restart
  on:
    tags: true

Upon tagging the repository:

git tag -a 1.0.0 -m "release 1.0.0"

and pushing to the remote repository, Travis-CI kicks off the build but exits immediately after the following:

$ git fetch --tags
Done. Your build exited with 0.

Travis-CI does not deploy the application to Heroku. Am I missing a piece?

有帮助吗?

解决方案

There is currently a glitch with on: tags: true that the condition is never met and the code will never trigger a deploy. The github issue is here. The issue should be resolved soon, and in the meantime you can use a branch like releases to update your heroku app with on:branch.

Update: To fix on:tags, you can do this, as refrenced in the above github issue.

 on:
    tags: true
    all_branches: true
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top