Sha256: 4426b7561b0f366a67afb4a621c3b80d2f5f2a5412b720df45f0d118ae8c03e4

Contents?: true

Size: 1007 Bytes

Versions: 2

Compression:

Stored size: 1007 Bytes

Contents

#!/usr/bin/env sh

# Run this script to deploy the app to Github Pages.

RED='\033[0;31m'

# Exit if any subcommand fails.
set -e

# Check if any changes are uncommited.
if ! git diff-files --quiet --ignore-submodules --
then
  echo >&2 "${RED}Please commit your changes first before deploying!"
  git diff-files --name-status -r --ignore-submodules -- >&2
  exit 0
fi

echo "Started deploying"

# Checkout gh-pages branch.
if [ `git branch | grep gh-pages` ]
then
  git branch -D gh-pages
fi
git checkout -b gh-pages

# Build site.
yarn install --modules-folder ./_assets/yarn
bundle exec jekyll build

# Delete and move files.
find . -maxdepth 1 ! -name '_site' ! -name '.git' ! -name '.gitignore' -exec rm -rf {} \;
mv _site/* .
rm -R _site/

# Push to gh-pages.
git add -fA
git commit --allow-empty -m "$(git log -1 --pretty=%B) [ci skip]"
git push -f -q origin gh-pages

# Move back to previous branch.
git checkout -
yarn install --modules-folder ./_assets/yarn

echo "Deployed Successfully!"

exit 0

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
kickster-2.2.0 template/bin/deploy
kickster-2.1.0 template/bin/deploy