are variables actually defined?
Some checks failed
Deploy website on production server when committing on main / test (push) Failing after 7s

This commit is contained in:
Bryan Joshua Pedini 2024-08-21 23:14:15 +02:00
parent 0c6699e211
commit 80b3490e37

View File

@ -29,6 +29,11 @@ if [ -z "${DEPLOYMENT_HOST}" ] || [ -z "${DEPLOYMENT_PATH}" ]; then
exit 1 exit 1
fi fi
echo "${SSH_PRIVATE_KEY}"
echo "${SSH_USERNAME}"
echo "${DEPLOYMENT_HOST}"
echo "${DEPLOYMENT_PATH}"
tar -czf httpdocs.tgz -C public . tar -czf httpdocs.tgz -C public .
scp -o StrictHostKeyChecking=no ${SSH_PRIVATE_KEY} httpdocs.tgz ${SSH_USERNAME}${DEPLOYMENT_HOST}:/tmp/httpdocs.tgz scp -o StrictHostKeyChecking=no ${SSH_PRIVATE_KEY} httpdocs.tgz ${SSH_USERNAME}${DEPLOYMENT_HOST}:/tmp/httpdocs.tgz
ssh -o StrictHostKeyChecking=no ${SSH_PRIVATE_KEY} ${SSH_USERNAME}${DEPLOYMENT_HOST} "DEPLOYMENT_PATH=$DEPLOYMENT_PATH bash" << 'EOF' ssh -o StrictHostKeyChecking=no ${SSH_PRIVATE_KEY} ${SSH_USERNAME}${DEPLOYMENT_HOST} "DEPLOYMENT_PATH=$DEPLOYMENT_PATH bash" << 'EOF'