Hao*_* Yu 5 travis-ci github-pages
从GitHub Pages 部署的文档来看,似乎可以将存储库 A 的应用程序部署到另一个存储库 B 的 github 页面。在我的用例中,我想部署到组织 github pages organization.github.io。由于组织 github pages 只接受master分支中的文件,我想在另一个 repo 上开发该应用程序。
所以在我的开发仓库(让我们称之为organization/app)中,我有这样的.travis.yml:
language: node_js
node_js:
- "node"
install:
- npm install
script:
- npm run lint
- npm run build
deploy:
provider: pages
local-dir: dist
github-token: $GITHUB_TOKEN
skip-cleanup: true
keep-history: true
repo: organization/organization.github.io
target-branch: master
on:
branch: master
Run Code Online (Sandbox Code Playgroud)
即使已经指定了repo和target-branch,Travis CI 仍然将所有构建文件部署到organization/app:gh-pages,而不是organization/organization.github.io:master.
| 归档时间: |
|
| 查看次数: |
519 次 |
| 最近记录: |