diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..17dfad4 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,19 @@ +language: python +python: +- 2.7 +branches: + only: + - master +cache: + directories: + - $HOME/.cache/pip + - $HOME/pygrow + - $HOME/virtualenv +env: + global: + - secure: "o0VA1qXI9ZWPwSRnMODjVPiVWtKF+4ZdimgFfYybbi7gIW0h5xboO/mBEnRLuUfCg3I2lx3SNpt7rxG/GDrwXtLEW1SPXJs4kRxfgWZZiwmWjBgF1PHjED2mw5uqbV9e/6b9OGzJ0uYzWH41Zjzcnv3BpZ/oWsCNTHub+SV9ycmg2ZgLEJNQKImGiKFRwLPnQQWeLcJChX2XdGH0oE+sXk0FtmSNzmoWBEpn8dG2UXSRcka4FvISsWU434hAUJsjzQCSVKey6ZlEvVNNIs77/i7Ba7LtvbObeJLrtp0ytSEO6rriFWN8K12DIdQxilPVrN+Lwx6+oSK1mqZFWjbtAiiMX137i2A934HqJH/L+2NrPKIWzyS4+ZHObwvaJHSahl4Z1htDWbmSRO4xwdIdo3/S8L9OpqB6wyJNZIVvF5tUqBtwNJ8fqYKG6ekzYh+GpAyfZ/oKIrZEAeMH2bHSGz8QF6JKLhoKbMQnpSPV32INl8kA67tY8Uf9UfrLQ0bn7cB2WHYFf+plCGZwaZUy8yWN+LY8AL3sG2hb2D597vCve252HYZazsunQTR3CMO4fWoZvS24XaGg73Av/WdHQicQnSGneVyhjsbmJpG97SN18fRptyyxy+e0Wl+AopQ9HEXSLHAzgAr+/wqsESWfl6aLBFO+wANgiqSvPp6NKeo=" +install: +- bash ./install-grow.sh +- bash ./setup.sh +- git clone https://$GITHUB_TOKEN@github.com/stevenle/stevenle.github.io.git +script: bash ./deploy-travis.sh diff --git a/deploy-travis.sh b/deploy-travis.sh new file mode 100755 index 0000000..c54b31e --- /dev/null +++ b/deploy-travis.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +set -ex + +grow deploy -f travis +cd stevenle.github.io +git config user.name "Travis CI" +git config user.email "stevenle08@gmail.com" + +if [[ -z $(git status -s) ]]; then + echo "No changes to commit" +else + git add . + git commit -m "Auto deploy at rev=$TRAVIS_COMMIT" + git push -u origin master +fi diff --git a/install-grow.sh b/install-grow.sh new file mode 100755 index 0000000..aef7615 --- /dev/null +++ b/install-grow.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +set -ex + +if [ ! -d "$HOME/pygrow" ]; then + git clone https://github.com/grow/pygrow.git $HOME/pygrow +else + git pull +fi + +pip install $HOME/pygrow diff --git a/podspec.yaml b/podspec.yaml index 994fc55..33cec21 100644 --- a/podspec.yaml +++ b/podspec.yaml @@ -15,3 +15,6 @@ deployments: github: destination: local out_dir: ../stevenle.github.io/ + travis: + destination: local + out_dir: stevenle.github.io/ diff --git a/setup.sh b/setup.sh new file mode 100755 index 0000000..45d36e4 --- /dev/null +++ b/setup.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +set -ex + +npm install +bower install