特拉维斯-CI:S3部署脚本没有添加新文件

问题描述 投票:1回答:2

我的最终目标是要能够安排我的化身博客文章。我使用的特拉维斯 - CI每当我承诺在Github上我的主分支/ _site /内容部署到一个S3桶。

特拉维斯-CI流量按预期工作,但一个事实,即未建成并ADDD到/ _site /目录中,除非我在当地建立自己的网站,并直接推新/ _site /文件夹掌握新的页面。该帖子出现在/ _posts /但没有得到建立和加入/ _site /自动,因为他们应该时,该网站每天重建。

我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.
install: gem install jekyll html-proofer jekyll-twitter-plugin
script: jekyll build && htmlproofer ./_site

# branch whitelist, only for GitHub Pages
branches:
  only:
  - master

env:
  global:
  - NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer

exclude: [vendor]

sudo: false # route your build to the container-based infrastructure for a faster build

deploy:
  provider: s3
  access_key_id: $AWS_ACCESS_KEY
  secret_access_key: $AWS_SECRET_KEY
  bucket: $S3_BUCKET
  local_dir: _site
jekyll travis-ci
2个回答
1
投票

我想通了这一点:特拉维斯-CI部署的宝石不包括生成步骤。它只是推动回购到S3的内容。我更新了我的构建脚本来推动作为构建和验证步骤的一部分。


0
投票

你必须设置选项skip_cleanup上部署指令为真

© www.soinside.com 2019 - 2024. All rights reserved.