From d8cb9cfab5c86fcac8941614fa28dc38e2793d1e Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Thu, 13 Jun 2019 01:42:32 +0200 Subject: [PATCH] Using Travis to deploy --- .travis.yml | 37 +++++++++++++++++++++++++++++++++++++ Gemfile | 4 ++++ script/cibuild | 5 +++++ 3 files changed, 46 insertions(+) create mode 100644 .travis.yml create mode 100644 Gemfile create mode 100644 script/cibuild diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..d50f247 --- /dev/null +++ b/.travis.yml @@ -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 \ No newline at end of file diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..75feaf5 --- /dev/null +++ b/Gemfile @@ -0,0 +1,4 @@ +source "https://rubygems.org" + +gem "jekyll" +gem "html-proofer" diff --git a/script/cibuild b/script/cibuild new file mode 100644 index 0000000..1e39c79 --- /dev/null +++ b/script/cibuild @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +set -e # halt script on error + +bundle exec jekyll build +bundle exec htmlproofer ./_site