ci
Some checks failed
study-online / Explore-Gitea-Actions (push) Has been cancelled

This commit is contained in:
libingxiang 2025-08-04 16:21:34 +08:00
parent 93234fbbe2
commit e26bf17c17

View File

@ -24,20 +24,34 @@ 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版本
node-version: '23.5.0'
- name: Install dependencies
run: npm install # 或者 yarn install
run: |
timeout 300 npm install || {
echo "npm install failed or timed out"
exit 1
}
- name: Build project
run: npm run build # 或者 yarn build根据package.json中的脚本调整
run: |
timeout 300 npm run build || {
echo "Build failed or timed out"
exit 1
}
- name: Package dist folder
run: |
if [ ! -d "dist" ]; then
echo "Error: dist directory not found"
ls -la
exit 1
fi
zip -r frontend-dist.zip dist
mv frontend-dist.zip /yantoo/frontend/