File tree Expand file tree Collapse file tree
MaiChartManager/Front/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,12 +13,12 @@ jobs:
1313 runs-on : self-hosted
1414
1515 steps :
16+ - run : git config --global core.longPaths true
1617 - name : Checkout
1718 uses : actions/checkout@v4
1819 with :
1920 fetch-depth : 0
2021 submodules : recursive
21- clean : false
2222
2323 - name : Checkout Assets
2424 uses : clansty/checkout@main
4343 dotnet nuget add source https://api.nuget.org/v3/index.json -n nuget.org
4444 }
4545
46- - name : Install Frontend Dependencies
47- shell : powershell
48- run : |
49- corepack enable
50- Push-Location MaiChartManager\Front
51- pnpm install
52- Pop-Location
53-
5446
5547 - name : Build
5648 shell : powershell
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import './global.sass';
1313
1414createApp ( App )
1515 . use ( router )
16- . use ( i18n )
16+ . use ( i18n as any )
1717 . use ( posthog )
1818 . use ( sentry )
1919 . mount ( '#app' ) ;
Original file line number Diff line number Diff line change @@ -103,7 +103,13 @@ try {
103103Write-Host " Building Frontend..." - ForegroundColor Cyan
104104Push-Location " $ProjectRoot \MaiChartManager\Front"
105105try {
106- cmd / c pnpm build
106+ pnpm install
107+ if ($LASTEXITCODE -ne 0 ) { throw " pnpm install failed with exit code $LASTEXITCODE " }
108+ Write-Host " Node: $ ( node - v) | pnpm: $ ( pnpm - v) " - ForegroundColor Yellow
109+ Write-Host " Working dir: $ ( Get-Location ) " - ForegroundColor Yellow
110+ Write-Host " unocss/reset exists: $ ( Test-Path node_modules\@unocss \reset\tailwind- compat.css) " - ForegroundColor Yellow
111+ pnpm build
112+ if ($LASTEXITCODE -ne 0 ) { throw " Frontend build failed with exit code $LASTEXITCODE " }
107113} finally {
108114 Pop-Location
109115}
@@ -119,10 +125,13 @@ try {
119125 Write-Host " Using Configuration: $ConfigName " - ForegroundColor Yellow
120126
121127 dotnet publish - p:Configuration= $ConfigName
128+ if ($LASTEXITCODE -ne 0 ) { throw " dotnet publish failed with exit code $LASTEXITCODE " }
122129} finally {
123130 Pop-Location
124131}
125132
133+ Copy-Item " $ProjectRoot \MaiChartManager\wwwroot" " $PSScriptRoot \Pack\wwwroot" - Recurse - Force
134+
126135# ==========================================
127136# 6. 准备打包目录
128137# ==========================================
You can’t perform that action at this time.
0 commit comments