From 8121b07b1cf7904ab39fb79943b8e084b4d02f4a Mon Sep 17 00:00:00 2001 From: libingxiang Date: Mon, 4 Aug 2025 16:24:27 +0800 Subject: [PATCH] ci --- .gitea/workflows/deploy.yaml | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index d9d36b9..0b0d834 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -24,26 +24,20 @@ jobs: - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner." - run: echo "🖥️ The workflow is now ready to test your code on the runner." - # 设置超时的Node.js安装 - - name: Setup Node.js - uses: actions/setup-node@v3 - timeout-minutes: 5 - with: - node-version: '23.5.0' + # 使用系统已安装的 Node.js v16.15.0 + - name: Use system Node.js v16.15.0 + run: | + echo "Using system Node.js" + node --version + npm --version + # 确保 Node.js 在 PATH 中 + export PATH=$(dirname $(which node)):$PATH - name: Install dependencies - run: | - timeout 300 npm install || { - echo "npm install failed or timed out" - exit 1 - } + run: npm install - name: Build project - run: | - timeout 300 npm run build || { - echo "Build failed or timed out" - exit 1 - } + run: npm run build - name: Package dist folder run: | @@ -53,10 +47,10 @@ jobs: exit 1 fi zip -r frontend-dist.zip dist - mv frontend-dist.zip /yantoo/frontend/ + sudo mv frontend-dist.zip /yantoo/frontend/ - name: Extract package in target directory run: | cd /yantoo/frontend/ - unzip -o frontend-dist.zip - rm frontend-dist.zip + sudo unzip -o frontend-dist.zip + sudo rm frontend-dist.zip