GitHub Actions Error on automatic Deploy

I encounter an error in my Github Actions where I try to automatically deploy my Laravel App to

Unfortunately I encounter the following error:

Running easymedbox-api-laravel release_command: php /var/www/html/artisan migrate --force
> Created release_command machine 48e5711b333d08
> Waiting for 48e5711b333d08 to have state: started
> Machine 48e5711b333d08 has state: started
> Waiting for 48e5711b333d08 to have state: destroyed
> Machine 48e5711b333d08 has state: destroyed
> Waiting for 48e5711b333d08 to get exit event
✔ release_command 48e5711b333d08 completed successfully
WARN failed to acquire lease: failed to get lease on VM 9080556a2d00e8: unauthorized

Error: error acquiring leases on all machines
Error: Process completed with exit code 1.

But I used the template action from the docs

name: Deploy to - Test API

      - main

    runs-on: ubuntu-latest

      - name: Checkout repository
        uses: actions/checkout@v3

      - name: Setup FlyActions
        uses: superfly/flyctl-actions/setup-flyctl@master

      - name: Deploy to
        run: flyctl deploy --remote-only
          FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

What am I missing here? Didn’t find something helpful on the forums.

I already tried to refresh the API_KEY

Did you read this post:

I personally have not read through it, but seems like the same kind of issue

Yeah that’s the same kind of issue but unfortunately there is no real solution included.

Had the same issue. Did some testing and determined it was the API tokens that were causing it. Using a deploy token causes this, but using an auth token doesn’t.

1 Like

Thank you! That resolved the issue. Strange that deploy tokens don’t work.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.