diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index f9cdf2c..f8f8ae2 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -153,18 +153,20 @@ jobs: echo "" # SSH as root and use sudo to run deployment script as deploy user - # We use a custom command here since we don't have a deploy.sh on the server yet, - # or we follow the pattern of the example which assumes a deploy.sh exists. - # Looking at the original workflow, it ran commands directly. - # The example uses "sudo -u deploy /home/deploy/deploy.sh". - # I will stick to the example's pattern but ensure the site path is correct. - + # This works around the broken SSH output issue with deploy user ssh -o StrictHostKeyChecking=accept-new \ -o ServerAliveInterval=30 \ -o ServerAliveCountMax=3 \ -o ConnectTimeout=10 \ root@alpha.mintel.me \ - "sudo -u deploy /home/deploy/deploy.sh" + "CONTACT_RECIPIENT='${{ secrets.CONTACT_RECIPIENT }}' \ + SMTP_FROM='${{ secrets.SMTP_FROM }}' \ + SMTP_HOST='${{ secrets.SMTP_HOST }}' \ + SMTP_PASS='${{ secrets.SMTP_PASS }}' \ + SMTP_PORT='${{ secrets.SMTP_PORT }}' \ + SMTP_SECURE='${{ secrets.SMTP_SECURE }}' \ + SMTP_USER='${{ secrets.SMTP_USER }}' \ + sudo -u deploy -E /home/deploy/deploy.sh" DEPLOY_EXIT_CODE=$? echo ""