fix: use sshpass instead of ssh-action
Build and Deploy / build-and-push (push) Successful in 9s
Build and Deploy / deploy (push) Failing after 0s

This commit is contained in:
2026-07-21 21:26:00 +08:00
parent 210fea2195
commit cc9e8bd62d
+3 -6
View File
@@ -55,13 +55,10 @@ jobs:
if: github.event_name == 'push' && github.ref == 'refs/heads/main' if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps: steps:
- name: Deploy to server - name: Deploy to server
uses: applebox/ssh-action@v1.0.3 run: |
with: sshpass -p "${{ secrets.SSH_PASSWORD }}" ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} << 'EOF'
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
password: ${{ secrets.SSH_PASSWORD }}
script: |
cd /opt/taskpool cd /opt/taskpool
docker compose pull docker compose pull
docker compose up -d docker compose up -d
docker image prune -f docker image prune -f
EOF