我正在尝试为我的应用程序创建一个演示分支,供应商可以在其中登录以了解有关其功能的更多信息。
我有一个在 Heroku 上部署到生产环境的 master 分支。此外,我有一个部署到我的 Heroku 登台环境的登台分支。在 Github 应用程序中,我从暂存分支创建了一个名为“demo”的分支。
当我使用 CircleCI 进行部署时,我收到以下错误:
unable to push to unqualified destination: master
The destination refspec neither matches an existing ref on the remote nor
begins with refs/, and we are unable to guess a prefix based on the source ref.
git push git@heroku.com:foobar-demo.git $CIRCLE_SHA1:master returned exit code 1
error: failed to push some refs to 'git@heroku.com:foobar-demo.git' Action failed: git push git@heroku.com:foobar-demo.git $CIRCLE_SHA1:master
我的 circle.yml 如下所示:
deployment:
staging:
branch: staging
commands:
- heroku maintenance:on --app foobar-staging
#- heroku scale worker=0 --app foobar-staging
- git push git@heroku.com:foobar-staging.git $CIRCLE_SHA1:master
- heroku run rake db:migrate --app foobar-staging
#- heroku scale worker=x --app foobar-staging
- heroku maintenance:off --app foobar-staging
demo:
branch: demo
commands:
- heroku maintenance:on --app foobar-demo
#- heroku scale worker=0 --app foobar-demo
- git push git@heroku.com:lfoobar-demo.git $CIRCLE_SHA1:master
- heroku run rake db:migrate --app foobar-demo
#- heroku scale worker=x --app foobar-demo
- heroku maintenance:off --app foobar-demo
暂存的部署流程运行良好,唯一的问题是我的新演示分支。我尝试删除分支和 Heroku 应用程序(foobar-demo.herokuapp.com),但没有任何运气。