From e07e1589f8bb12d3a7df09e6ac3d329501944dc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AD=8F=E9=A3=8E?= Date: Tue, 10 Mar 2026 22:20:08 +0800 Subject: [PATCH] test6 --- .gitea/workflows/build.yml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 3bacfe2..6588898 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -8,21 +8,23 @@ on: jobs: build: runs-on: ubuntu-latest + # 不加 container,直接用宿主机的 node v22 steps: - - name: Checkout + - name: Checkout code run: | - git clone "http://gitea:3000/${{ gitea.repository }}.git" . - git checkout "${{ gitea.sha }}" + git clone "http://172.17.0.1:3000/${{ github.repository }}.git" . + git checkout "${{ github.sha }}" - - name: Install Node.js & Build - run: | - node -v - npm install - npm run build + - name: Install dependencies + run: npm install - - name: Deploy + - name: Build Hexo + run: npm run build + + - name: Deploy to HTML directory run: | rm -rf /home/ubuntu/html/* cp -r public/* /home/ubuntu/html/ - echo "✅ 构建完成!" \ No newline at end of file + echo "✅ 构建完成!" + ls -la /home/ubuntu/html/ \ No newline at end of file