test2
Some checks failed
Build and Deploy / deploy (push) Failing after 9s

This commit is contained in:
andy-sg
2026-03-05 19:22:10 +09:00
parent be6b1e6b93
commit a72ecb257f

View File

@@ -28,12 +28,13 @@ jobs:
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }} DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
DEPLOY_USER: ${{ secrets.DEPLOY_USER }} DEPLOY_USER: ${{ secrets.DEPLOY_USER }}
run: | run: |
apk add --no-cache openssh-client
mkdir -p ~/.ssh mkdir -p ~/.ssh
echo "$DEPLOY_KEY" > ~/.ssh/id_ed25519 echo "$DEPLOY_KEY" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519 chmod 600 ~/.ssh/id_ed25519
ssh-keyscan -H $DEPLOY_HOST >> ~/.ssh/known_hosts 2>/dev/null ssh-keyscan -H $DEPLOY_HOST >> ~/.ssh/known_hosts 2>/dev/null
tar -czf /tmp/dist.tar.gz -C dist . tar -czf /tmp/dist.tar.gz -C dist .
ssh ${DEPLOY_USER}@${DEPLOY_HOST} "rm -rf /volume1/web/app/*"
scp /tmp/dist.tar.gz ${DEPLOY_USER}@${DEPLOY_HOST}:/volume1/web/app/ scp /tmp/dist.tar.gz ${DEPLOY_USER}@${DEPLOY_HOST}:/volume1/web/app/
ssh ${DEPLOY_USER}@${DEPLOY_HOST} "cd /volume1/web/app && tar -xzf dist.tar.gz && rm dist.tar.gz" ssh ${DEPLOY_USER}@${DEPLOY_HOST} "cd /volume1/web/app && tar -xzf dist.tar.gz && rm dist.tar.gz"