Deploying to Heroku using git on bitbucket

后端 未结 6 816
北海茫月
北海茫月 2020-12-04 11:07

I want to host my source on bitbucket using git because I obviously get a free private repo and I want to host my app on heroku using the source code from bitbucket.

<
6条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-04 11:45

    Bitbucket supports now Pipelines, which should make it pretty easy to deploy on Heroku. Just follow this tutorial: https://confluence.atlassian.com/bitbucket/deploy-to-heroku-872013667.html

    My bitbucket-pipelines.yml to just push the master branch to Heroku looks like this:

    image: node:6
    clone:
      depth: full
    pipelines:
      branches:
        master:
          - step:
              script:
                - git push -f https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git $BITBUCKET_BRANCH
    

提交回复
热议问题