diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6f485fc..c8d3ec0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,7 +32,8 @@ deploy_production: - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' - echo "Deploying to server" - ssh backend@wmi-backend-gc.plannaplan.pl -t "sudo systemctl stop plannaplan-backend" - - rsync --progress target/*.jar --delete backend@wmi-backend-gc.plannaplan.pl:/opt/plannaplan-backend/backend.jar + - ssh backend@wmi-backend-gc.plannaplan.pl -t "rm -rf /opt/plannaplan-backend/backend.jar" + - rsync --progress target/*.jar backend@wmi-backend-gc.plannaplan.pl:/opt/plannaplan-backend/backend.jar - sleep 5 - ssh backend@wmi-backend-gc.plannaplan.pl -t "sudo systemctl start plannaplan-backend" - echo "Deployed"