🏡 index : github.com/captn3m0/tld-a-record.git

author Nemo <me@captnemo.in> 2020-04-27 11:18:07.0 +05:30:00
committer Nemo <me@captnemo.in> 2020-04-27 11:18:07.0 +05:30:00
commit
5c50074c746a6a31085deb009f9c5efe703140e2 [patch]
tree
266d947825d413e1c8d6d13c4991043ba894e92e
parent
f2ac77c5e32f54e81c98a45fc1b4fd891980b8a0
download
5c50074c746a6a31085deb009f9c5efe703140e2.tar.gz

Try to maintain history



Diff

 ci.sh | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/ci.sh b/ci.sh
index 6a2d493..1b217ad 100755
--- a/ci.sh
+++ a/ci.sh
@@ -1,21 +1,22 @@
#!/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
  cd _site
  git init
  git remote add origin "$GIT_REMOTE"
if ([ $TRAVIS_BRANCH == "keep-history" ] && [ $TRAVIS_PULL_REQUEST == "false" ]); then
  cp -r _site/* /tmp/remote_site
  cd /tmp/remote_site
  git add .
  git commit -m "Deploy to GitHub Pages"
  git push --force --quiet origin master:gh-pages > /dev/null 2>&1
  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!"