nanoc environments \o/

This commit is contained in:
Lorin Werthen 2016-11-21 14:17:29 +01:00
parent 513a60f95d
commit fd35397c04
No known key found for this signature in database
GPG key ID: F11FFC921E0E08E0
5 changed files with 17 additions and 13 deletions

View file

@ -14,9 +14,9 @@ before_install:
- echo -e "Host zeus.ugent.be\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- npm install
script:
- ZEUS_PRODUCTION=1 bundle exec nanoc
- ZEUS_PRODUCTION=1 bundle exec nanoc check --deploy
- bundle exec nanoc --env=prod
- bundle exec nanoc --env=prod check --deploy
after_success:
- mv deploy_key ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- '[[ $TRAVIS_PULL_REQUEST == "false" ]] && [[ $TRAVIS_BRANCH == "master" ]] && ZEUS_PRODUCTION=1 bundle exec nanoc deploy public'
- '[[ $TRAVIS_PULL_REQUEST == "false" ]] && [[ $TRAVIS_BRANCH == "master" ]] && bundle exec nanoc --env=prod deploy public'

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true
source 'https://rubygems.org'
gem 'nanoc', '4.3.7'
gem 'nanoc', '4.4.1'
gem 'kramdown'
gem 'coffee-script'
gem 'sass'

View file

@ -3,7 +3,7 @@ GEM
specs:
adsf (1.2.1)
rack (>= 1.0.0)
autoprefixer-rails (6.5.1.1)
autoprefixer-rails (6.5.3)
execjs
builder (3.2.2)
coderay (1.1.1)
@ -28,17 +28,17 @@ GEM
shellany (~> 0.0)
thor (>= 0.18.1)
guard-compat (1.2.1)
guard-nanoc (2.1.0)
guard-nanoc (2.1.1)
guard (~> 2.8)
guard-compat (~> 1.0)
nanoc (~> 4.0)
nanoc (>= 4.3.8, < 5.0)
hamster (3.0.0)
concurrent-ruby (~> 1.0)
highline (1.7.8)
icalendar (2.4.1)
json (2.0.2)
kramdown (1.12.0)
libv8 (3.16.14.15)
kramdown (1.13.0)
libv8 (3.16.14.17)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
@ -46,7 +46,7 @@ GEM
lumberjack (1.0.10)
method_source (0.8.2)
mini_portile2 (2.1.0)
nanoc (4.3.7)
nanoc (4.4.1)
cri (~> 2.3)
hamster (~> 3.0)
parallel (~> 1.9)
@ -93,7 +93,7 @@ DEPENDENCIES
highline
icalendar
kramdown
nanoc (= 4.3.7)
nanoc (= 4.4.1)
sass
terminal-notifier-guard
therubyracer

View file

@ -1,6 +1,6 @@
module EnvironmentHelper
def production?
ENV['ZEUS_PRODUCTION']
ENV['NANOC_ENV'] == 'prod'
end
def development?

View file

@ -3,7 +3,11 @@ title: Zeus WPI
author_name: ''
author_uri: ''
base_url: https://zeus.ugent.be
base_url: http://localhost:3000
environments:
prod:
base_url: https://zeus.ugent.be
# The syntax to use for patterns in the Rules file. Can be either `"glob"`
# (default) or `"legacy"`. The former will enable glob patterns, which behave