修复 CI 部署:使用原生 ssh 替代 appleboy action

This commit is contained in:
2569718930@qq.com
2026-05-19 14:22:43 +08:00
parent cd9de0926b
commit 9db37c6d7b
2 changed files with 102 additions and 82 deletions
+6 -6
View File
@@ -69,14 +69,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Deploy to VPS
uses: appleboy/ssh-action@v1
with:
host: ${{ secrets.VPS_HOST }}
username: ${{ secrets.VPS_USER }}
key: ${{ secrets.VPS_SSH_KEY }}
script: |
run: |
mkdir -p ~/.ssh
echo "${{ secrets.VPS_SSH_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh -o StrictHostKeyChecking=accept-new ${{ secrets.VPS_USER }}@${{ secrets.VPS_HOST }} "
cd /root/PolyWeather
git pull origin main
docker compose up -d --build
sleep 10
curl -s http://localhost:8000/healthz
"