mirror of https://github.com/captn3m0/tld-a-record
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
566 B
23 lines
566 B
#!/bin/bash |
|
set -euo pipefail |
|
IFS=$'\n\t' |
|
BRANCH="gh-pages" |
|
# Run the scan |
|
|
|
cd website |
|
bundle install |
|
bundle show |
|
bundle exec jekyll build --verbose --destination _site |
|
|
|
git clone "$GIT_REMOTE" --branch "$BRANCH" /tmp/remote_site |
|
|
|
if ([ $TRAVIS_BRANCH == "master" ] && [ $TRAVIS_PULL_REQUEST == "false" ]); then |
|
cp -r _site/* /tmp/remote_site |
|
cd /tmp/remote_site |
|
git add . |
|
git commit -m "Update: `date`" |
|
git push --force --quiet origin > /dev/null 2>&1 |
|
echo 'Build successful, deployed to gh-pages.' |
|
else |
|
echo "Build successful, but not deploying!" |
|
fi
|
|
|