Sha256: 39f23705e5a923a706ea2a85cb52991af8832c0c9615bf6e375814a65996b4d3
Contents?: true
Size: 918 Bytes
Versions: 10
Compression:
Stored size: 918 Bytes
Contents
#!/bin/bash # Automated deploy script with Travis CI. # Exit if any subcommand fails. set -e # Variables 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" # Checkout gh-pages branch. if [ `git branch | grep gh-pages` ] then git branch -D gh-pages fi git checkout -b gh-pages # Build site. bower install 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 config user.name "$USERNAME" git config user.email "$EMAIL" git add -fA git commit --allow-empty -m "$COMMIT_MESSAGE [ci skip]" git push -f -q $ORIGIN_CREDENTIALS gh-pages # Move back to previous branch. git checkout - bower install echo "Deployed Successfully!" exit 0
Version data entries
10 entries across 10 versions & 1 rubygems