heroku-deploy icon indicating copy to clipboard operation
heroku-deploy copied to clipboard

Push rejected to ***.

Open kimmy-wang opened this issue 2 years ago • 5 comments

screenshot-20220430-204631

截屏2022-04-30 20 41 01

kimmy-wang avatar Apr 30 '22 12:04 kimmy-wang

add this line beforce uses: akhileshns/[email protected]

  - run: git pull

chenly avatar May 01 '22 06:05 chenly

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.

kimmy-wang avatar May 01 '22 10:05 kimmy-wang

I've got the same issue.

ronvohra avatar May 05 '22 12:05 ronvohra

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.

cansin avatar May 19 '22 01:05 cansin

Make sure you regenerate your Heroku API key. It helped in my case.

harastaivan avatar Jun 13 '22 11:06 harastaivan