tld-a-record/ci.sh

22 lines
495 B
Bash
Raw Normal View History

2019-07-01 20:11:37 +00:00
#!/bin/bash
2019-07-06 08:08:47 +00:00
set -euo pipefail
IFS=$'\n\t'
2019-07-01 20:11:37 +00:00
# Run the scan
cd website
bundle install
2019-07-01 20:49:52 +00:00
bundle exec jekyll build --destination _site
2019-07-01 20:36:08 +00:00
if ([ $TRAVIS_BRANCH == "travis" ] && [ $TRAVIS_PULL_REQUEST == "false" ]); then
cd _site
git init
git remote add origin "$GIT_REMOTE"
git add .
git commit -m "Deploy to GitHub Pages"
git push --force --quiet origin master:gh-pages > /dev/null 2>&1
echo 'Build successful, deployed to gh-pages.'
else
echo "Build successful, but not deploying!"
fi