Adding auto deployment for web.teaspeak.de

canary
WolverinDEV 2020-08-05 19:20:40 +02:00
parent 6eed79ad61
commit 31ee012f12
2 changed files with 13 additions and 2 deletions

View File

@ -26,7 +26,13 @@ jobs:
deploy: deploy:
- provider: script - provider: script
script: "bash scripts/travis/deploy_dev_server.sh" script: "bash scripts/travis/deploy_server.sh development"
cleanup: false
skip_cleanup: true
on:
branch: develop
- provider: script
script: "bash scripts/travis/deploy_server.sh production"
cleanup: false cleanup: false
skip_cleanup: true skip_cleanup: true
on: on:

View File

@ -1,5 +1,10 @@
#!/usr/bin/env bash #!/usr/bin/env bash
if [[ -z "$1" ]]; then
echo "Missing deploy channel"
exit 1
fi
cd "$(dirname "$0")/../../" || { echo "Failed to enter base dir"; exit 1; } cd "$(dirname "$0")/../../" || { echo "Failed to enter base dir"; exit 1; }
source ./scripts/travis/properties.sh source ./scripts/travis/properties.sh
@ -41,5 +46,5 @@ _exit_code=$?
echo "Failed to upload the .zip file ($_exit_code)" echo "Failed to upload the .zip file ($_exit_code)"
exit 1 exit 1
} }
ssh -oStrictHostKeyChecking=no -oIdentitiesOnly=yes -i /tmp/sftp_key TeaSpeak-Travis-Web@web.teaspeak.dev "./unpack.sh tmp-upload/$filename" ssh -oStrictHostKeyChecking=no -oIdentitiesOnly=yes -i /tmp/sftp_key TeaSpeak-Travis-Web@web.teaspeak.dev "./unpack.sh $1 tmp-upload/$filename"
exit $? exit $?