From b1d128a7c900537062c5141c1730bdb87f15b9a8 Mon Sep 17 00:00:00 2001 From: Nathan Marley Date: Wed, 27 Sep 2017 22:08:30 +0100 Subject: [PATCH 1/2] build site using docker --- cibuild.sh | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/cibuild.sh b/cibuild.sh index fcf59b6..d8d6e50 100644 --- a/cibuild.sh +++ b/cibuild.sh @@ -1,5 +1,18 @@ -#!/usr/bin/env bash -set -e # halt script on error +#! /bin/bash -npm run build -#bundle exec htmlproofer ./_site --disable-external --allow-hash-href --assume-extension --alt-ignore '/.*/' --file-ignore /assets/,/dist/,/style-guide/,/blog/ --url-ignore '/^\/binaries\/.+$/,/^\/forum\/?.*$/' +# halt script on error, echo commands/output +set -xe + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +SRC_ROOT="$DIR" + +echo "[$SRC_ROOT]" + +(cd $SRC_ROOT && \ + docker build -t dash-website-build . && \ + docker create --name dash-www dash-website-build && \ + docker cp dash-www:/data/_site/ ./_site/ && \ + docker rm dash-www && \ + (cd _site && rm -fr README.md) && \ + echo "Ok. Site built in ${SRC_ROOT}/_site/" +) From dba173f5d96a669adc3171ce997ef7b7fd71cea6 Mon Sep 17 00:00:00 2001 From: Nathan Marley Date: Thu, 28 Sep 2017 09:10:42 +0100 Subject: [PATCH 2/2] update travis settings --- .travis.yml | 38 ++++++++++++++++---------------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8955506..84441d3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,29 +1,23 @@ -language: node_js -node_js: -- 4.5.0 -before_script: -- chmod +x ./cibuild.sh -- ssh-keyscan -H -t rsa,dsa $hostname >> ~/.ssh/known_hosts -script: ./cibuild.sh -env: - global: - - NOKOGIRI_USE_SYSTEM_LIBRARIES=true - - CXX=g++-4.8 -sudo: false +sudo: required +dist: trusty +language: python +python: + - '3.6' + +script: + - bash cibuild.sh + - test -d _site/ && test -s _site/index.html + +before_deploy: + - ssh-keyscan -H -t rsa,dsa $hostname >> ~/.ssh/known_hosts + addons: ssh_known_hosts: - - www-test.dash.org - - 146.185.153.42 - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - g++-4.8 -before_install: -- rvm install 2.3.1 + - www-test.dash.org + deploy: provider: script skip_cleanup: true - script: test $TRAVIS_TEST_RESULT = 0 && script/deploy-rsync.sh + script: bash script/deploy-rsync.sh on: branch: master