修复 CI 部署:使用原生 ssh 替代 appleboy action
This commit is contained in:
@@ -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
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user