deploy preview test
This commit is contained in:
parent
0e89f41b43
commit
8eb1ab3a2d
2 changed files with 10 additions and 1 deletions
|
@ -23,4 +23,5 @@ script:
|
||||||
after_success:
|
after_success:
|
||||||
- mv deploy_key ~/.ssh/id_rsa
|
- mv deploy_key ~/.ssh/id_rsa
|
||||||
- chmod 600 ~/.ssh/id_rsa
|
- chmod 600 ~/.ssh/id_rsa
|
||||||
- '[[ $TRAVIS_PULL_REQUEST == "false" ]] && [[ $TRAVIS_BRANCH == "master" ]] && bundle exec nanoc --env=prod deploy public'
|
- chmod +x ./deploy.sh
|
||||||
|
- ./deploy.sh
|
||||||
|
|
8
deploy.sh
Executable file
8
deploy.sh
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#! /bin/bash
|
||||||
|
if [[ $TRAVIS_PULL_REQUEST == "false" ]]; then
|
||||||
|
if [[ $TRAVIS_BRANCH == "master" ]]; then
|
||||||
|
bundle exec nanoc --env=prod deploy public
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
rsync -aglpPrtvz --delete output/ "deploy@$TRAVIS_PULL_REQUEST.zeus.werthen.com:/var/www/html/$TRAVIS_PULL_REQUEST/"
|
||||||
|
fi
|
Loading…
Reference in a new issue