AkhileshNS / heroku-deploy

A simple github action that dynamically deploys an app to heroku
MIT License
981 stars 258 forks source link

Error: Command failed: git config user.name "Heroku-Deploy" #117

Open Emekarr opened 2 years ago

Emekarr commented 2 years ago

This is the workflow file

deploy:

runs-on: ubuntu-latest
needs: [build]

steps:
- name: Deploy to Heroku
  # You may pin to the exact commit or the version.
  # uses: AkhileshNS/heroku-deploy@79ef2ae4ff9b897010907016b268fd0f88561820
  uses: AkhileshNS/heroku-deploy@v3.12.12
  with:
    # This will be used for authentication. You can find it in your heroku homepage account settings
    heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
    # Email that you use with heroku
    heroku_email: ${{ secrets.HEROKU_EMAIL }}
    # The appname to use for deploying/updating
    heroku_app_name: app-name
    # Set this to true if you don't want to automatically create the Heroku app
    dontautocreate: true
    # Set if your app is located in a subdirectory.
    appdir: ./src/workers/worker.js
shakedlokits commented 2 years ago

I experience this as well

JevAr00 commented 2 years ago

Hi, I had the same problem and I solved doing this:

deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - name: Deploy to heroku
        if: ${{ github.event_name == 'push' }}
        uses: akhileshns/heroku-deploy@v3.12.12
        with:
          heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
          heroku_app_name: ${{ secrets.HEROKU_APP }}
          heroku_email: ${{ secrets.HEROKU_EMAIL }}

You have to use the checkout first.
The fetch-depth is optional. Checkout action here