From d6229da8740519f3019e6f8d564cfccb13fc50a7 Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Thu, 7 May 2026 08:29:50 -0600 Subject: [PATCH] add actions --- .github/workflows/deploy.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..143b48a --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,31 @@ +name: Deploy + +on: + push: + branches: + - yuetsh + +permissions: + contents: read + +jobs: + deploy: + runs-on: ubuntu-latest + strategy: + matrix: + include: + - name: debian + remote_port: 22 + script: /root/OJ/backend.sh + - name: school + remote_port: 8822 + script: /root/OJDeploy/backend.sh + 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 ${{ matrix.script }}