heroku-deploy
heroku-deploy copied to clipboard
Push rejected to ***.

add this line beforce uses: akhileshns/[email protected]
- run: git pull
https://github.com/AkhileshNS/heroku-deploy/blob/79ef2ae4ff9b897010907016b268fd0f88561820/index.js#L223-L233
I read the source code of this project and found that regardless of whether you have set the value of dontuseforce in the code, the value of this variable dontuseforce will be overwritten to true. Only after this code runs and reports an error, the value of this variable dontuseforce will not be overwritten, even with the original value of the variable.
The error message in the first picture is misleading, you should actually look at the error message in the second picture.
I've got the same issue.
We were having a similar issue (if not the same). Turns out we forgot to add our bot account to the Heroku application (with Deploy access). Doing that, plus the below deploy.yml
works for us currently:
name: Deploy
concurrency:
group: deploy
cancel-in-progress: false
on:
push:
branches:
- master
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Deploy code
uses: akhileshns/[email protected]
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "sample-app-name"
heroku_email: "[email protected]"
team: "sample-team"
dontuseforce: true
dontautocreate: true
Hope this helps someone.
Make sure you regenerate your Heroku API key. It helped in my case.