Skip to content

Commit

Permalink
TravisCI: Enable automatic deployment to GitHub Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Turbo87 committed Sep 13, 2015
1 parent eb437f9 commit 5087bb5
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
language: node_js

sudo: false

after_success:
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then bash .travis/deploy.sh; fi
20 changes: 20 additions & 0 deletions .travis/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

set -e

eval "$(ssh-agent -s)"

openssl aes-256-cbc -K $encrypted_f72e501d769d_key -iv $encrypted_f72e501d769d_iv -in .travis/deploy_key.pem.enc -out .travis/deploy_key.pem -d
chmod 600 .travis/deploy_key.pem
ssh-add .travis/deploy_key.pem

mkdir gh-pages
cd gh-pages
cp -R ../examples ../src .

git init
git config user.name "Travis"
git config user.email "[email protected]"
git add .
git commit -m "Deploy to GitHub Pages"
git push --force --quiet [email protected]:Turbo87/leaflet-sidebar.git master:gh-pages > /dev/null 2>&1
Binary file added .travis/deploy_key.pem.enc
Binary file not shown.

0 comments on commit 5087bb5

Please sign in to comment.