Skip to content

Instantly share code, notes, and snippets.

@r4hulp r4hulp/travis.yml
Last active Jun 29, 2018

Embed
What would you like to do?
Travis Build Script for Jekyll and Firebase
#use node_js
language: node_js
#define node js version to use
node_js:
- "7"
#choose branch on commit of which this script should excecute
branches:
only:
- master
#set notifications frequency
notifications:
email:
on_success: never
on_failure : change
before_install:
#install rvm 2.2
- rvm install 2.2
#use rvm 2.2
- rvm use 2.2
#set home varaibles
- . $HOME/.nvm/nvm.sh && nvm install 6.1 && nvm use 6.1
#install gems through bundler
- gem install bundler
#if gems are missing this script will get the missing gems.
- bundle check || bundle install
install:
#install firebase tools, required to deploy on firebase hosting
- npm install -g firebase-tools
# Assume bundler is being used, therefore
# the `install` step will run `bundle install` by default.
script:
#continue even after error
- set -e
#build jekyll site
- jekyll build
after_success:
#deploy to firebase using stored token.
- firebase deploy --token "$FIREBASE_API_TOKEN"
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
#Visit article at - http://wrapcode.com
#Cheers, Rahul.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.