From f53d7d4287a6dd0aacce9c9c80d632167312cb73 Mon Sep 17 00:00:00 2001 From: Bond Zhu <37842169+MRZHUH@users.noreply.github.com> Date: Tue, 16 Jun 2026 15:35:48 +0800 Subject: [PATCH] ci: add deploy-agent workflow triggered on deploy/agent branch (#37496) --- .github/workflows/deploy-agent.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/deploy-agent.yml diff --git a/.github/workflows/deploy-agent.yml b/.github/workflows/deploy-agent.yml new file mode 100644 index 0000000000..e244bb3f94 --- /dev/null +++ b/.github/workflows/deploy-agent.yml @@ -0,0 +1,28 @@ +name: Deploy Agent + +permissions: + contents: read + +on: + workflow_run: + workflows: ["Build and Push API & Web"] + branches: + - "deploy/agent" + types: + - completed + +jobs: + deploy: + runs-on: depot-ubuntu-24.04 + if: | + github.event.workflow_run.conclusion == 'success' && + github.event.workflow_run.head_branch == 'deploy/agent' + steps: + - name: Deploy to server + uses: appleboy/ssh-action@0ff4204d59e8e51228ff73bce53f80d53301dee2 # v1.2.5 + with: + host: ${{ secrets.AGENT_SSH_HOST }} + username: ${{ secrets.SSH_USER }} + key: ${{ secrets.SSH_PRIVATE_KEY }} + script: | + ${{ vars.SSH_SCRIPT_AGENT || secrets.SSH_SCRIPT_AGENT }}