Sha256: 468815d88eaac6057b2c00b5291e43767288bc605a27828335cdf76afd284f17

Contents?: true

Size: 950 Bytes

Versions: 3

Compression:

Stored size: 950 Bytes

Contents

#!/bin/bash

ORIGIN_URL=`git config --get remote.origin.url`
ORIGIN_CREDENTIALS=${ORIGIN_URL/\/\/github.com/\/\/$GITHUB_TOKEN@github.com}
COMMIT_MESSAGE=$(git log -1 --pretty=%B)

echo "Started deploying to the gh-pages branch."

echo "Creating clean gh-pages branch."
if [ `git branch | grep gh-pages` ]
then
  git branch -D gh-pages
fi
git checkout -b gh-pages

echo "Building site."
bower install
bundle exec jekyll build --destination temp || exit 1

echo "Removing old files"
find . -maxdepth 1 ! -name 'temp' ! -name '.git' ! -name '.gitignore' -exec rm -rf {} \;

mv temp/* . || exit 1
rm -R temp/ || exit 1

echo "Pushing content"
git config user.name "$USERNAME"
git config user.email "$EMAIL"

git add -fA || exit 1
git commit --allow-empty -m "$COMMIT_MESSAGE" || exit 1

git push -f -q "$ORIGIN_CREDENTIALS" gh-pages > /dev/null 2>&1

echo "Deployed Successfully"

echo "Checking out previous branch"
git checkout -
bower install

exit 0

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
kickster-1.0.4 snippets/automated
kickster-1.0.3 snippets/automated
kickster-1.0.2 snippets/automated