Sha256: 3ed96f4a11e2c018d6ddb374d64311fdd8d3f65aa4b44c8269d5f2f3994c0bda
Contents?: true
Size: 980 Bytes
Versions: 2
Compression:
Stored size: 980 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. 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 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 - 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 | snippets/travis/automated |
kickster-2.1.0 | snippets/travis/automated |