Last active
March 2, 2017 15:57
-
-
Save TangChr/a82de21353a0e0228732178b555eae5b to your computer and use it in GitHub Desktop.
Travis CI: Build and test Jekyll website using HTMLProofer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
language: ruby | |
rvm: 2.3.3 | |
branches: | |
only: | |
- master | |
script: bundle exec rake test | |
env: | |
global: | |
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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