From 6bd02882d54fdb11f2afaa69bf3868577e7245db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AD=8F=E9=A3=8E?= Date: Tue, 10 Mar 2026 21:51:28 +0800 Subject: [PATCH] test4 --- .gitea/workflows/build.yml | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index b686c7c..3f4e35d 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -11,30 +11,18 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + run: | + git clone "${GITEA_SERVER_URL}/${GITHUB_REPOSITORY}.git" . + git checkout "${GITHUB_SHA}" - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: '20' + - name: Install Node.js & Build + run: | + node -v + npm install + npm run build - - name: Cache dependencies - uses: actions/cache@v4 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- - - - name: Install Hexo dependencies - run: npm install - - - name: Build Hexo - run: npm run build - - - name: Deploy to HTML directory + - name: Deploy run: | rm -rf /home/ubuntu/html/* cp -r public/* /home/ubuntu/html/ - echo "✅ 构建完成!" - ls -la /home/ubuntu/html/ \ No newline at end of file + echo "✅ 构建完成!" \ No newline at end of file