"Skipping a deployment with the heroku provider because this branch is not permitted: main" despite no condition

Hi!
I’m traying to deploy on Heroku and get the next message:

Skipping a deployment with the heroku provider because this branch is not permitted: main

Here is my config file

language: node_js
cache:
  directories:
    - ~/.npm
node_js:
  - '12'
git:
  depth: 3
script:
  - yarn test
  - yarn build
deploy:
  provider: heroku
  api_key:
    secure: my-encrypted-api-key

I cheked the next option on Heroku:
image

I used this line to generate the api key:

travis encrypt $(heroku auth:token) --add deploy.api_key

My principal and unique branch on github is main.

URL of logs: Travis CI - Test and Deploy with Confidence

Thanks in advance.

A deployment clause has a default implicit condition of branch: master. Your branch main doesn’t fulfill it.

So depending on your needs, you need to either adjust that condition (e.g. branch: main) or remove it with all_branches: true.