From 1abdac0aa7eabe62f0ef6754d4739b45abbb12f3 Mon Sep 17 00:00:00 2001 From: Fallen_Breath Date: Wed, 6 Nov 2024 02:57:15 +0800 Subject: [PATCH] auto deploy ci --- .github/workflows/{image.yml => ci.yml} | 15 +++++++++++++++ 1 file changed, 15 insertions(+) rename .github/workflows/{image.yml => ci.yml} (70%) diff --git a/.github/workflows/image.yml b/.github/workflows/ci.yml similarity index 70% rename from .github/workflows/image.yml rename to .github/workflows/ci.yml index 675d4d1..a807c71 100644 --- a/.github/workflows/image.yml +++ b/.github/workflows/ci.yml @@ -48,3 +48,18 @@ jobs: labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max + + deploy: + runs-on: ubuntu-latest + if: github.event_name == 'push' && github.ref == 'refs/heads/master' + needs: + - image + steps: + - uses: appleboy/ssh-action@v1.1.0 + with: + host: ${{ secrets.DEPLOY_SSH_HOST }} + port: ${{ secrets.DEPLOY_SSH_PORT }} + username: ${{ secrets.DEPLOY_SSH_USERNAME }} + fingerprint: ${{ secrets.DEPLOY_SSH_FINGERPRINT }} + key: ${{ secrets.DEPLOY_SSH_PRIVATE_KEY }} + script: ${{ secrets.DEPLOY_SSH_SCRIPT }}