Travis CI build成功, 但是deploy失败

代码在master分支,
要将build出来的dist文件夹部署到gh-pages分支

.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 # Set in travis-ci.org dashboard
  on:
    branch: gh-pages

错误提示:

 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.

似乎我对on理解有偏差
但是改成以下后还是一样的错

  on:
    branch: master
阅读 7k
1 个回答
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进