From 3c013e300ad03d1f0833aa1f2b813c3699530ab5 Mon Sep 17 00:00:00 2001 From: "2569718930@qq.com" <2569718930@qq.com> Date: Tue, 19 May 2026 13:24:02 +0800 Subject: [PATCH] =?UTF-8?q?CI=20=E5=85=A8=E6=B5=81=E7=A8=8B=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=8C=96=EF=BC=9A=E6=B5=8B=E8=AF=95=E9=80=9A=E8=BF=87?= =?UTF-8?q?=E5=90=8E=E8=87=AA=E5=8A=A8=E9=83=A8=E7=BD=B2=E5=88=B0=20VPS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 79f95c1a..d612ba55 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,3 +62,21 @@ jobs: - name: Build Docker image run: docker build -t polyweather-ci . + + deploy: + needs: [python-quality, frontend-quality, docker-build] + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + 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: | + cd /root/PolyWeather + git pull origin main + docker compose up -d --build + sleep 10 + curl -s http://localhost:8000/healthz