image: python:3.9 pipelines: branches: development: - step: name: Compress and Deploy to Develop Server deployment: development script: - apt-get update && apt-get install -y sshpass git - ls -halF - curl ipinfo.io/ip - git archive --format=tar HEAD | gzip > locale_bundle.tar.gz - sshpass -p $DEVELOP_SERVER_PASSWORD scp -o StrictHostKeyChecking=no locale_bundle.tar.gz $DEVELOP_SERVER_USERNAME@$DEVELOP_SERVER_IP:/app - sshpass -p $DEVELOP_SERVER_PASSWORD ssh -o StrictHostKeyChecking=no $DEVELOP_SERVER_USERNAME@$DEVELOP_SERVER_IP "cd /app && rm -rf sic_locale && tar -xzf /app/locale_bundle.tar.gz -C /app/sic_locale && source /app/venv/bin/activate && cd /app/sicweb && python manage.py compilemessages && sudo systemctl restart sicweb.policies.service && sudo systemctl restart sicweb.service"