From 85d5d14845ecbefdf0b14e4c89199f8d1eb70869 Mon Sep 17 00:00:00 2001 From: admin Date: Sun, 5 Jul 2026 19:43:36 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E6=B7=BB=E5=8A=A0=20SSH=20=E9=83=A8?= =?UTF-8?q?=E7=BD=B2=E6=AD=A5=E9=AA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/docker.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/docker.yml b/.gitea/workflows/docker.yml index bc364ce..fe5721b 100644 --- a/.gitea/workflows/docker.yml +++ b/.gitea/workflows/docker.yml @@ -45,4 +45,22 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - no-cache: true \ No newline at end of file + no-cache: true + + deploy: + needs: build-and-push + runs-on: ubuntu + + steps: + - name: Deploy to server + uses: appleboy/ssh-action@v1.0.3 + with: + host: ${{ secrets.DEPLOY_HOST }} + username: ${{ secrets.DEPLOY_USER }} + password: ${{ secrets.DEPLOY_PASSWORD }} + script: | + cd ${{ secrets.DEPLOY_PATH }} + echo "${{ secrets.TOKEN }}" | docker login git.viaeon.com -u ${{ github.actor }} --password-stdin + docker compose pull + docker compose up -d + docker image prune -af \ No newline at end of file