From 31671d8006679ae552e82044b85db40bf32b71ee Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Thu, 7 May 2026 08:45:59 -0600 Subject: [PATCH] fix actions --- .github/workflows/depley.yaml | 46 ++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/.github/workflows/depley.yaml b/.github/workflows/depley.yaml index c1d89b7..f03fb7b 100644 --- a/.github/workflows/depley.yaml +++ b/.github/workflows/depley.yaml @@ -1,23 +1,29 @@ -# name: Deploy +name: Deploy -# on: -# push: -# branches: -# - main +on: + push: + branches: + - yuetsh -# jobs: -# deploy-and-run: -# runs-on: ubuntu-latest +permissions: + contents: read -# steps: -# - uses: actions/checkout@v4 - -# - uses: appleboy/ssh-action@v1.2.1 -# with: -# host: ${{ secrets.HOST }} -# username: root -# key: ${{ secrets.KEY }} -# script: | -# cd ~/WebPreview/api -# git pull -# sh ~/WebPreview/run.sh +jobs: + deploy: + runs-on: ubuntu-latest + strategy: + matrix: + include: + - name: debian + remote_port: 22 + - name: school + remote_port: 8822 + steps: + - name: Deploy to ${{ matrix.name }} + uses: appleboy/ssh-action@v1 + with: + host: ${{ secrets.HOST }} + port: ${{ matrix.remote_port }} + username: root + key: ${{ secrets.KEY }} + script: sh /root/WebPreview/backend.sh