From c1b62134ebadc063df7de1f26bb52f70e0702d77 Mon Sep 17 00:00:00 2001 From: engigu Date: Sat, 27 Dec 2025 12:57:29 +0800 Subject: [PATCH] chore: add depoly --- .github/workflows/deploy.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3fcfd90..f6ed00c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,6 +1,8 @@ -name: Build-Deploy +name: Build-Deploy-Server on: + push: + branches: [ main ] workflow_dispatch: env: @@ -58,7 +60,7 @@ jobs: cache-to: type=gha,scope=linux-amd64,mode=max provenance: false - - name: Deploy to server + - name: Deploy to Demo server uses: appleboy/ssh-action@v1.2.0 with: host: ${{ secrets.DEPLOY_HOST }} @@ -69,4 +71,15 @@ jobs: cd ${{ secrets.DEPLOY_PATH }} docker-compose pull docker-compose up -d - + + - name: Deploy to X server + uses: appleboy/ssh-action@v1.2.0 + with: + host: ${{ secrets.DEPLOY_X_HOST }} + username: ${{ secrets.DEPLOY_X_USER }} + password: ${{ secrets.DEPLOY_X_PASSWORD }} + port: ${{ secrets.DEPLOY_X_PORT }} + script: | + cd ${{ secrets.DEPLOY_X_PATH }} + docker-compose pull + docker-compose up -d \ No newline at end of file