Say I have a feature branch `feature/my-feature` and using pipelines I want to deploy to a Heroku app called `dev-server`.
My pipelines config has the branch config:
branches:
feature/*:
- step:
name: Build feature branch and push to Heroku dev server
deployment: test
script:
- npm install
- git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME_DEV.git HEAD
When deploying, logs say:
<span>remote: Pushed to non-master branch, skipping build.</span><span>+ git push <a href="https://heroku:%24HEROKU_API_KEY@git.heroku.com/%24HEROKU_APP_NAME_DEV.git" target="_blank" rel="nofollow noopener noreferrer">https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME_DEV.git</a> HEAD<br></span>
And the app does not get built on the Heroku server.
Apparently this is because Heroku needs the app to be built on the master branch.
What should the git push command be to have the build occur on the master branch?
I tried replacing "HEAD" with "master" but the build failed with error
<span>error: src refspec master does not match any.</span><span>+ git push <a href="https://heroku:%24HEROKU_API_KEY@git.heroku.com/%24HEROKU_APP_NAME_DEV.git" target="_blank" rel="nofollow noopener noreferrer">https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME_DEV.git</a> master<br></span>