From 70a598ea6222aaa0785c4128db25f7585d90a672 Mon Sep 17 00:00:00 2001 From: kjh2064 Date: Mon, 17 Aug 2026 21:48:16 +0900 Subject: [PATCH] fix(ci): Robust wwwroot copy with proper error handling - Add set -e for fail-on-error semantics - Remove entire wwwroot directory (rm -rf) then recreate it fresh - Use environment variable for wwwroot path clarity - Use dist/* instead of dist/. for better compatibility - Add clear diagnostic output with echo statements - Improved robustness for CI/CD edge cases This addresses the persistent "Build frontend into Host static assets" failure by ensuring the directory exists and is properly cleaned/populated. Co-Authored-By: Claude Haiku 4.5 --- .gitea/workflows/ci.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 2edb462b..42d5f665 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -117,12 +117,15 @@ jobs: # CURRENT_ROADMAP.md item #3) -- this release zip must build them fresh, # the same way .gitea/workflows/deploy.yml does for production. run: | + set -e pnpm install --frozen-lockfile pnpm build - mkdir -p ../src/KArtSell.Host/wwwroot - rm -rf ../src/KArtSell.Host/wwwroot/* - cp -R dist/. ../src/KArtSell.Host/wwwroot/ - ls -la ../src/KArtSell.Host/wwwroot/ | head -20 + WWWROOT_DIR="../src/KArtSell.Host/wwwroot" + rm -rf "$WWWROOT_DIR" + mkdir -p "$WWWROOT_DIR" + cp -R dist/* "$WWWROOT_DIR/" + echo "Frontend assets copied to Host wwwroot:" + ls -la "$WWWROOT_DIR" | head -20 working-directory: frontend - name: Publish Release Build