1

我试图让 Travis CI 自动部署和合并分支以掌握。这是我正在使用的脚本。在构建成功时,它说它正在跳过部署,因为它不在正确的分支上,这就是为什么我希望它合并分支是构建成功的原因。有小费吗?

script:
  - export RAILS_ENV=test
  - bundle exec rake db:create db:schema:load db:test:prepare
  - bundle exec rspec --color --format documentation --require spec_helper --require rails_helper
  - bundle exec brakeman --exit-on-warn --quiet -f plain
before_script:
  - bundle exec rake db:create
  - RAILS_ENV=test bundle exec rake db:migrate --trace
  - bundle exec rake db:test:prepare
deploy: &heroku
  provider: heroku
  api_key:
    secure: encrypted travis key
    app: herokuapp.com
    run: rake db:migrate
    strategy: git
    env:
      global:
        secure: encrytped github key
after_success:
  - "curl -o /tmp/travis-automerge https://raw.githubusercontent.com/mikeyduece/travis-automerge/master/travis-automerge"
  - "chmod a+x /tmp/travis-automerge/merge.sh"
  - "BRANCH_TO_MERGE_INTO=* GITHUB_REPO=user/repo /tmp/travis-automerge"
notifications:
  email: false
4

0 回答 0