Skip to content

Instantly share code, notes, and snippets.

@TangChr
Last active March 2, 2017 15:57
Show Gist options
  • Save TangChr/a82de21353a0e0228732178b555eae5b to your computer and use it in GitHub Desktop.
Save TangChr/a82de21353a0e0228732178b555eae5b to your computer and use it in GitHub Desktop.
Travis CI: Build and test Jekyll website using HTMLProofer
language: ruby
rvm: 2.3.3
branches:
only:
- master
script: bundle exec rake test
env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true
source 'https://rubygems.org'
gem 'github-pages'
gem 'wdm', '>= 0.1.0' if Gem.win_platform?
group :test do
gem 'rake'
gem 'html-proofer'
end
require 'html-proofer'
desc "build and test website"
task :test do
sh "bundle exec jekyll build"
HTMLProofer.check_directory(
"./_site",
{
:typhoeus => {
:followlocation => true,
:ssl_verifypeer => false,
:headers => {
'User-Agent' => 'html-proofer'
}
}
}
).run
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment