Using Travis to deploy

This commit is contained in:
Norbi Peti 2019-06-13 01:42:32 +02:00
parent 4024ebe455
commit d8cb9cfab5
No known key found for this signature in database
GPG key ID: DBA4C4549A927E56
3 changed files with 46 additions and 0 deletions

37
.travis.yml Normal file
View file

@ -0,0 +1,37 @@
language: ruby
rvm:
- 2.4.1
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 # test the master branch
env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer
addons:
apt:
packages:
- libcurl4-openssl-dev
sudo: false # route your build to the container-based infrastructure for a faster build
cache: bundler # caching bundler gem packages will speed up build
deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
keep_history: true
on:
branch: gh-pages
local_dir: _site

4
Gemfile Normal file
View file

@ -0,0 +1,4 @@
source "https://rubygems.org"
gem "jekyll"
gem "html-proofer"

5
script/cibuild Normal file
View file

@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -e # halt script on error
bundle exec jekyll build
bundle exec htmlproofer ./_site