Merge remote-tracking branch 'origin/master' into dev
Build / build (pull_request) Failing after 1m21s

This commit is contained in:
Timi
2026-11-06 17:54:15 +08:00
2 changed files with 63 additions and 1 deletions
+1 -1
View File
@@ -1,3 +1,3 @@
VITE_APP_TITLE=Gao Customer H5
VITE_USE_LOCAL_TIMI_WEB=true
VITE_API_BASE_URL=http://localhost:8091
VITE_API_BASE_URL=http://localhost:18091
+62
View File
@@ -0,0 +1,62 @@
name: Build
# 当前阶段只做构建验证:不部署 nginx、不发 Release
# 热更新包与生产部署在后续阶段以独立 workflow 接入
on:
pull_request:
branches:
- master
types:
- closed
workflow_dispatch:
jobs:
build:
runs-on: act_runner_node
if: ${{ github.event_name == 'workflow_dispatch' || github.event.pull_request.merged == true }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Configure nexus auth
env:
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
run: |
if [ -z "$NEXUS_USERNAME" ] || [ -z "$NEXUS_PASSWORD" ]; then
echo "FAIL: 缺少 secrets.NEXUS_USERNAME 或 secrets.NEXUS_PASSWORD"
exit 1
fi
auth=$(printf '%s:%s' "$NEXUS_USERNAME" "$NEXUS_PASSWORD" | base64 | tr -d '\n')
{
echo "registry=https://nexus.imyeyu.com/repository/npm-group/"
echo "//nexus.imyeyu.com/repository/npm-group/:_auth=${auth}"
echo "//nexus.imyeyu.com/repository/npm-group/:always-auth=true"
echo "//nexus.imyeyu.com/repository/npm-timi/:_auth=${auth}"
echo "//nexus.imyeyu.com/repository/npm-timi/:always-auth=true"
} > ~/.npmrc
echo "OK: nexus 认证已配置"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm run build
- name: Report output
run: |
echo "dist 大小: $(du -sh dist | cut -f1)"
echo "文件数: $(find dist -type f | wc -l)"
if [ -f dist/index.html ]; then
echo "index.html: 存在"
else
echo "FAIL: dist/index.html 缺失,产物不可用于热更新"
exit 1
fi
- name: Upload dist
uses: actions/upload-artifact@v4
with:
name: dist
path: dist
retention-days: 7