1
궁극적 인 목표는 제 지킬 블로그에 게시물을 예약 할 수있게하는 것입니다. Github의 master 브랜치에 커밋 할 때마다 Travis-CI를 사용하여/_site /의 내용을 S3 버킷에 배포합니다.Travis-CI : S3 배포 스크립트가 새 파일을 추가하지 않습니다.
트래비스-CI 흐름은 예상대로 작동하지만 사실 그 내장 I 로컬 내 사이트를 구축하고 마스터에 직접 새/_SITE/폴더를 추진하지 않는 한/_SITE/디렉토리에 addd되지 않은 새로운 페이지. 게시물은/_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