bugfix - repair PR CI - skip deploy dep init on PRs

This commit is contained in:
moocowmoo 2017-04-16 01:13:58 +00:00 committed by moocowmoo
parent 6f5b9fb528
commit 4ca3b129e2
2 changed files with 21 additions and 9 deletions

19
script/deploy-rsync.sh Executable file
View file

@ -0,0 +1,19 @@
#!/bin/bash
set -e
# punt if PR
if [[ $TRAVIS_PULL_REQUEST != 'false' ]]; then
echo "IS PULL REQUEST: Skipping deploy rsync"
elif [[ ! -z "$dash_org_pem_pass" ]]; then
echo -n "DEPLOY - decrypting key..."
openssl aes-256-cbc -k "$dash_org_pem_pass" -in dash.org-test-web.pem.enc -out dash.org-test-web.pem -d
chmod 600 dash.org-test-web.pem
echo "DONE"
echo "DEPLOY - copying content..."
export RSYNC_RSH='ssh -i dash.org-test-web.pem'
rsync -r -c -v --delete-after --exclude-from 'ciexclude.txt' $TRAVIS_BUILD_DIR/_site/ $user@$hostname:$production_path
echo "DONE"
else
echo "SKIPPING SITE DEPLOY "
fi