Travis CI build succeeded, but deploy failed

the code is in the master branch.
you want to deploy the dist folder from build to the gh-pages branch

.travis.yml

language: node_js
node_js: stable

install: npm install
script: npm run build

notifications:
  email: false

deploy:
  provider: pages
  skip_cleanup: true
  local-dir: dist
  github_token: $GITHUB_TOKEN -sharp Set in travis-ci.org dashboard
  on:
    branch: gh-pages

error prompt:

 DONE  Build complete. The dist directory is ready to be deployed.
      
The command "npm run build" exited with 0.
Skipping a deployment with the pages provider because this branch is not permitted

Done. Your build exited with 0.
< hr >

it seems that I have a misunderstanding of on
, but it is still the same mistake after changing it to the following

.
  on:
    branch: master

deployment succeeded.

is on: master that's right

attach a reference link:
GitHub Pages Deployment
Conditional Releases with 'on:'

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b375b2-2c083.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b375b2-2c083.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?