鍍金池/ 問(wèn)答/Linux  網(wǎng)絡(luò)安全/ Travis CI build成功, 但是deploy失敗

Travis CI build成功, 但是deploy失敗

代碼在master分支,
要將build出來(lái)的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

錯(cuò)誤提示:

 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.

似乎我對(duì)on理解有偏差
但是改成以下后還是一樣的錯(cuò)

  on:
    branch: master
回答
編輯回答
詆毀你

部署成功了...

就是要

on: master

附一下參考鏈接:
GitHub Pages Deployment
Conditional Releases with 'on:'

2018年8月2日 18:17