fix(ci): Robust wwwroot copy with proper error handling
cross-version-matrix / .NET 8 + PostgreSQL 14 (push) Has been cancelled
cross-version-matrix / .NET 8 + PostgreSQL 15 (push) Has been cancelled
cross-version-matrix / .NET 8 + PostgreSQL 16 (push) Has been cancelled
cross-version-matrix / Frontend Build (Node 22 + pnpm 10) (push) Has been cancelled
cross-version-matrix / DbUp Migration (PostgreSQL 14) (push) Has been cancelled
cross-version-matrix / DbUp Migration (PostgreSQL 15) (push) Has been cancelled
cross-version-matrix / DbUp Migration (PostgreSQL 16) (push) Has been cancelled
cross-version-matrix / Cross-Version Matrix Summary (push) Has been cancelled
cross-version-matrix / .NET 10 + PostgreSQL 15 (push) Has been cancelled
cross-version-matrix / .NET 10 + PostgreSQL 16 (push) Has been cancelled
cross-version-matrix / .NET 10 + PostgreSQL 14 (push) Has been cancelled
deploy / deploy (push) Failing after 54s
deploy / notify (push) Successful in 1s

- 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 <noreply@anthropic.com>
This commit is contained in:
2026-08-17 21:48:16 +09:00
parent 32e54c58b0
commit 70a598ea62
+7 -4
View File
@@ -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