diff --git a/.travis.yml b/.travis.yml index 2054737..50163b8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,10 +16,9 @@ script: phpunit tests deploy: provider: script - script: travis-deploy.sh + script: deploy.sh on: branch: msqur.com before_install: -- openssl aes-256-cbc -K $encrypted_63cff28d8c75_key -iv $encrypted_63cff28d8c75_iv - -in .travis/deploy_key.pem.enc -out .travis/deploy_key.pem -d +- openssl aes-256-cbc -K $encrypted_63cff28d8c75_key -iv $encrypted_63cff28d8c75_iv -in .travis/deploy_key.pem.enc -out .travis/deploy_key.pem -d diff --git a/deploy.sh b/deploy.sh index 1be100d..5e9a3c5 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,4 +1,12 @@ -. script.config +#. script.config -rsync -av --delete --exclude='*/.git*:.svn*' src/ $DEPLOY_DIR/ -cp -v VERSION $DEPLOY_DIR/ > /dev/null 2>&1 +eval "$(ssh-agent -s)" +chmod 600 .travis/deploy_key.pem +ssh-add .travis/deploy_key.pem + +#TODO Run backup script on remote + +rsync -av --delete --exclude='*/.git*:.svn*:*/config.php' src/ $DEPLOY_DIR/ + +rm .travis/deploy_key.pem +#cp -v VERSION $DEPLOY_DIR/ > /dev/null 2>&1 diff --git a/travis-deploy.sh b/travis-deploy.sh deleted file mode 100755 index eb4deaa..0000000 --- a/travis-deploy.sh +++ /dev/null @@ -1,6 +0,0 @@ - -eval "$(ssh-agent -s)" -chmod 600 .travis/deploy_key.pem -ssh-add .travis/deploy_key.pem -git remote add deploy $DEPLOY_REPO -git push deploy