Is that FLY_API_TOKEN set in your GitLab project settings? A useful experiment here might be to add before the deploy script line something like:
- flyctl status
to see that its able to pick up the auth for the API at all. You could also set LOG_LEVEL=debug to get a little more logs that might give us some better indication what’s going on.
You sir are very correct! It was the branch privilege that was the problem when setting the variable to protected. In any case if someone else is stuck follow this guide to set a protected branch: