ci: make deploy ssh fail fast
Some checks failed
deploy / build-and-deploy (push) Failing after 22s

This commit is contained in:
voson
2026-02-03 13:40:38 +08:00
parent 7a55547742
commit 765309082a

View File

@@ -55,5 +55,5 @@ jobs:
if: ${{ secrets.DEPLOY_SSH_KEY != '' }}
run: |
tar -C dist -czf - . | \
ssh -i ~/.ssh/deploy_key -p "${{ secrets.DEPLOY_SSH_PORT }}" "${{ secrets.DEPLOY_SSH_USER }}@${{ secrets.DEPLOY_SSH_HOST }}" \
ssh -o BatchMode=yes -o StrictHostKeyChecking=yes -o ConnectTimeout=15 -i ~/.ssh/deploy_key -p "${{ secrets.DEPLOY_SSH_PORT }}" "${{ secrets.DEPLOY_SSH_USER }}@${{ secrets.DEPLOY_SSH_HOST }}" \
"bash -lc 'set -euo pipefail; tmp=\"${{ secrets.DEPLOY_PATH }}.tmp\"; rm -rf \"$tmp\"; mkdir -p \"$tmp\"; tar -xzf - -C \"$tmp\"; rm -rf \"${{ secrets.DEPLOY_PATH }}\"; mv \"$tmp\" \"${{ secrets.DEPLOY_PATH }}\"'"