From 53bfe7b9d9ad3961fdb0913b656d74d907a13b84 Mon Sep 17 00:00:00 2001 From: Shuai Date: Sat, 20 Jun 2026 15:34:20 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.gitea/workflows/deplo?= =?UTF-8?q?y.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/deploy.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index e33a560..a82c0a6 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -25,11 +25,6 @@ jobs: SERVER_PORT="${{ secrets.SSH_PORT }}" TARGET_DIR="${{ secrets.TARGET_DIR }}" - : ${SERVER_HOST:="192.168.31.185"} - : ${SERVER_USER:="shuai"} - : ${SERVER_PORT:="2222"} - : ${TARGET_DIR:="/data/apps/ci-cd/frontend"} - echo "🌐 部署至 ${SERVER_USER}@${SERVER_HOST}:${TARGET_DIR} (端口: ${SERVER_PORT})" # 配置 SSH 密钥 From 91a8a069e1df6e74a812bbc9b7cad265fc6feb91 Mon Sep 17 00:00:00 2001 From: Shuai Date: Sat, 20 Jun 2026 16:07:37 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.gitea/workflows/deplo?= =?UTF-8?q?y.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index a82c0a6..ff00ed2 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -19,6 +19,7 @@ jobs: - name: Deploy via SCP run: | set -e + rsync --version SERVER_HOST="${{ secrets.SSH_HOST }}" SERVER_USER="${{ secrets.SSH_USER }}" From 4e8f8f975d9768e9970c50940468d3f48c858a53 Mon Sep 17 00:00:00 2001 From: Shuai Date: Sat, 20 Jun 2026 16:27:00 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.gitea/workflows/deplo?= =?UTF-8?q?y.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/deploy.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index ff00ed2..42e4d90 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -16,6 +16,12 @@ jobs: - name: Checkout code uses: http://192.168.31.185:3002/actions/checkout@v4 + steps: + - name: Install rsync + run: | + sudo apt-get update + sudo apt-get install -y rsync + - name: Deploy via SCP run: | set -e From b7b11c35067423e81b6e526692d90cb48dfabef0 Mon Sep 17 00:00:00 2001 From: Shuai Date: Sat, 20 Jun 2026 16:27:45 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.gitea/workflows/deplo?= =?UTF-8?q?y.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/deploy.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 42e4d90..2fd2e90 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -11,7 +11,6 @@ on: jobs: deploy: runs-on: ubuntu-latest - steps: - name: Checkout code uses: http://192.168.31.185:3002/actions/checkout@v4 From 1b93587f889cacdd3b88a09545df8efaf287e5ef Mon Sep 17 00:00:00 2001 From: Shuai Date: Sat, 20 Jun 2026 16:31:14 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.gitea/workflows/deplo?= =?UTF-8?q?y.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/deploy.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 2fd2e90..d317e71 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -11,16 +11,16 @@ on: jobs: deploy: runs-on: ubuntu-latest + steps: - name: Checkout code uses: http://192.168.31.185:3002/actions/checkout@v4 - - steps: + - name: Install rsync run: | sudo apt-get update sudo apt-get install -y rsync - + - name: Deploy via SCP run: | set -e From 582e74901786513e51b1a0798f818c98510aa3f9 Mon Sep 17 00:00:00 2001 From: Shuai Date: Sat, 20 Jun 2026 16:43:41 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.gitea/workflows/deplo?= =?UTF-8?q?y.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/deploy.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index d317e71..ae7c074 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -16,15 +16,14 @@ jobs: - name: Checkout code uses: http://192.168.31.185:3002/actions/checkout@v4 - - name: Install rsync + - name: version run: | - sudo apt-get update - sudo apt-get install -y rsync + npm --version + java -version - name: Deploy via SCP run: | set -e - rsync --version SERVER_HOST="${{ secrets.SSH_HOST }}" SERVER_USER="${{ secrets.SSH_USER }}" From bcd5aa107157a80acceef945640d051c41b10c5b Mon Sep 17 00:00:00 2001 From: Shuai Date: Sat, 20 Jun 2026 16:51:18 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.gitea/workflows/deplo?= =?UTF-8?q?y.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/deploy.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index ae7c074..c38cccd 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -16,10 +16,14 @@ jobs: - name: Checkout code uses: http://192.168.31.185:3002/actions/checkout@v4 - - name: version + - name: env run: | - npm --version - java -version + node -v + npm -v + java -version + mvn -version + git --version + docker --version - name: Deploy via SCP run: | From 28030d856335d6395cb2697e36195365b230854f Mon Sep 17 00:00:00 2001 From: Shuai Date: Sat, 20 Jun 2026 18:55:26 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.gitea/workflows/deplo?= =?UTF-8?q?y.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/deploy.yml | 58 ++++++++----------------------------- 1 file changed, 12 insertions(+), 46 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index c38cccd..eaa45c3 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -1,7 +1,4 @@ -# ========================================== -# 纯 Bash SCP 部署工作流(零外部 Action 依赖) -# ========================================== -name: Deploy Frontend +name: CI Test on: push: @@ -9,47 +6,16 @@ on: - main jobs: - deploy: - runs-on: ubuntu-latest - + test: + runs-on: ci-base + steps: - - name: Checkout code - uses: http://192.168.31.185:3002/actions/checkout@v4 - - - name: env + - uses: http://192.168.31.185:3002/actions/checkout@v4 + + - name: Check Environment run: | - node -v - npm -v - java -version - mvn -version - git --version - docker --version - - - name: Deploy via SCP - run: | - set -e - - SERVER_HOST="${{ secrets.SSH_HOST }}" - SERVER_USER="${{ secrets.SSH_USER }}" - SERVER_PORT="${{ secrets.SSH_PORT }}" - TARGET_DIR="${{ secrets.TARGET_DIR }}" - - echo "🌐 部署至 ${SERVER_USER}@${SERVER_HOST}:${TARGET_DIR} (端口: ${SERVER_PORT})" - - # 配置 SSH 密钥 - mkdir -p ~/.ssh - chmod 700 ~/.ssh - printf '%s\n' "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519 - chmod 600 ~/.ssh/id_ed25519 - - # 确保目标目录存在,并清空旧文件 - ssh -o StrictHostKeyChecking=accept-new -i ~/.ssh/id_ed25519 -p "${SERVER_PORT}" \ - "${SERVER_USER}@${SERVER_HOST}" "mkdir -p ${TARGET_DIR} && rm -rf ${TARGET_DIR}/*" - - # SCP 上传 - echo "🚀 开始上传文件..." - scp -o StrictHostKeyChecking=accept-new -i ~/.ssh/id_ed25519 -P "${SERVER_PORT}" -r \ - ./* \ - "${SERVER_USER}@${SERVER_HOST}:${TARGET_DIR}/" - - echo "✨ 部署成功!" + java -version + mvn -version + node -v + npm -v + docker --version \ No newline at end of file