我正在使用travis CI发布我的jekyll网站。
相关部分是:
.travis.yml
language: ruby
rvm:
- 2.3.3
before_script:
- chmod +x ./script/cibuild # or do this locally and commit
# Assume bundler is being used, therefore
# the `install` step will run `bundle install` by default.
script: ./script/cibuild
# branch whitelist, only for GitHub Pages
branches:
only:
- gh-pages # test the gh-pages branch
- /pages-(.*)/ # test every branch which starts with "pages-"
env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer
sudo: false # route your build to the container-based infrastructure for a faster build
deploy:
provider: pages
skip-cleanup: true
github-token: $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
keep-history: true
on:
branch: gh-pages
我的cibuild文件如下:
#!/usr/bin/env bash
set -e # halt script on error
bundle exec jekyll build
This is the full log of the build
一切似乎都在部署好,没有错误。
但是在Github我得到了:
故障排除无济于事。
以防万一。我正在运行jekyll-assets
而我无法直接使用gh-pages构建它,因此travis,具体请参见https://github.com/github/pages-gem/issues/189:https://github.com/github/pages-gem/issues/189#issuecomment-319070628
我真的不确定如何处理,github错误没有帮助。
答案 0 :(得分:1)
如果您的网站已由CI构建,则可以在代码的根目录中添加.nojekyll
文件,以指示gh-pages不生成,只是发布您的网站。