diff --git a/.gitea/workflows/sgeupdated.yml b/.gitea/workflows/sgeupdated.yml index c80afaa..1213f8f 100644 --- a/.gitea/workflows/sgeupdated.yml +++ b/.gitea/workflows/sgeupdated.yml @@ -22,8 +22,6 @@ jobs: - name: Run deploy script on server run: | - ssh ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }} << 'EOF' - echo "✅ PR merged into main — running deploy script.." - cd /home/ubuntu/Bgreen/sgeUpdated - ./deploy.sh - EOF + # We add -tt to force a pseudo-terminal (fixes that stdin error) + # We call bash -lc to force a Login Shell, which loads your credentials + ssh -tt ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }} "bash -lc 'cd /home/ubuntu/Bgreen/sgeUpdated && ./deploy.sh'"