[Fix] Restructure HTML files after UI build so extensionless routes work in CI
This commit is contained in:
parent
ac9ebdf4d8
commit
4ee7d42981
@ -3127,6 +3127,10 @@ jobs:
|
||||
cd ui/litellm-dashboard
|
||||
npm run build
|
||||
cp -r out/ ../../litellm/proxy/_experimental/out/
|
||||
# Restructure HTML so extensionless routes work (login.html -> login/index.html)
|
||||
find ../../litellm/proxy/_experimental/out -name '*.html' ! -name 'index.html' | while read -r f; do
|
||||
d="${f%.html}"; mkdir -p "$d"; mv "$f" "$d/index.html"
|
||||
done
|
||||
- run:
|
||||
name: Wait for PostgreSQL
|
||||
command: dockerize -wait tcp://localhost:5432 -timeout 30s
|
||||
|
||||
@ -103,7 +103,16 @@ npm install --silent 2>/dev/null || true
|
||||
npm run build
|
||||
# Copy the fresh build to the proxy's static UI directory
|
||||
cp -r "$DASHBOARD_DIR/out/" "$REPO_ROOT/litellm/proxy/_experimental/out/"
|
||||
echo "UI build copied to proxy static directory"
|
||||
|
||||
# Restructure HTML files so extensionless routes work (e.g. /ui/login)
|
||||
# Next.js export produces login.html; the proxy expects login/index.html
|
||||
find "$REPO_ROOT/litellm/proxy/_experimental/out" -name '*.html' ! -name 'index.html' | while read -r htmlfile; do
|
||||
target_dir="${htmlfile%.html}"
|
||||
target_path="$target_dir/index.html"
|
||||
mkdir -p "$target_dir"
|
||||
mv "$htmlfile" "$target_path"
|
||||
done
|
||||
echo "UI build copied and restructured"
|
||||
|
||||
# --- Python environment ---
|
||||
echo "=== Setting up Python environment ==="
|
||||
|
||||
Loading…
Reference in New Issue
Block a user