Better way is to configure Travis to automate deployment of jekyll with non-supported plugins. Follow Travis getting started guide to enable Travis for your repo.
Create script/cibuild
with the following content
#!/usr/bin/env bash
set -e # halt script on error
bundle exec jekyll build
touch ./_site/.nojekyll # this file tells gh-pages that there is no need to build
Create .travis.yml
with the following content (modify as required)
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:
- master
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
keep-history: true
local_dir: _site/ # deploy this directory containing final build
github_token: $GITHUB_API_KEY # Set in travis-ci.org dashboard
on:
branch: master
Deployment steps (after every push):
- Build will be created using our custom script
script/cibuild
in _site
directory
_site
will be pushed to gh-pages
branch.
- github pages will serve site as it is without building it again (because of
.nojekyll
file)
Reference: My repository https://github.com/armujahid/armujahid.me/ is using this method for continuous integration using Travis CI