1
0
Fork 0
docsearch/scripts/docs/update-website
2018-02-07 10:56:52 +01:00

29 lines
534 B
Bash
Executable file

#! /usr/bin/env bash
set -ev # exit when error
if [ -z $TRAVIS_BRANCH ]; then
currentBranch=`git rev-parse --abbrev-ref HEAD`
else
currentBranch=$TRAVIS_BRANCH
fi
if [ $currentBranch != 'master' ]; then
printf "update-website: You must be on master"
exit 1
else
export STAGE=production
fi
VERSION=`cat package.json | json version`
set -e # exit when error
printf "\nPublish website to gh-pages\n"
cd docs
bundle install
rm -rf build
bundle exec middleman build --no-parallel
cd ..
babel-node scripts/docs/gh-pages.js