fix(ci): Starter-Defaults patchen auch api/config.yml Namespace
deploy to production / deploy (push) Successful in 43s

This commit is contained in:
2026-10-05 17:13:10 +00:00
parent 3b29930b8a
commit e76ebb32ab
+14 -2
View File
@@ -3,7 +3,7 @@ set -euo pipefail
# CI helper: resolve starter placeholders for staging.
# Called from .gitea/workflows/deploy.yml (before validate/build).
# Keeps placeholders in git (template), patches .env in CI workspace only.
# Keeps placeholders in git (template), patches CI workspace only (.env + api/config.yml).
#
# Detection: PROJECT_NAME=__PROJECT_NAME__ or TIBI_NAMESPACE=__TIBI_NAMESPACE__
# Real projects: no-op (already concrete values).
@@ -27,7 +27,7 @@ if [ "${is_starter}" != "true" ]; then
exit 0
fi
echo "ci-starter-defaults: starter detected, patching .env for CI workspace only."
echo "ci-starter-defaults: starter detected, patching CI workspace only (.env + api/config.yml)."
PROJECT_NAME="tibi-svelte-starter"
TIBI_NAMESPACE="tibi-svelte-starter"
@@ -59,5 +59,17 @@ patch_env "CODING_TIBIADMIN_URL" "${CODING_TIBIADMIN_URL}"
patch_env "LIVE_URL" "${LIVE_URL}"
patch_env "MOCK" "${MOCK}"
# tibi-server reads the namespace from api/config.yml (not .env) —
# without this the staged api/ still carries __TIBI_NAMESPACE__ and staging reports "project not found".
if [ -f api/config.yml ]; then
sed -i 's#^namespace:.*#namespace: '"${TIBI_NAMESPACE}"'#g' api/config.yml
echo "______ api/config.yml (namespace) ______"
head -3 api/config.yml
fi
# Apache fallback (unused in staging docker setup, kept consistent)
if [ -f frontend/.htaccess ]; then
sed -i 's#__TIBI_NAMESPACE__#'"${TIBI_NAMESPACE}"'#g' frontend/.htaccess || true
fi
echo "______ .env (starter-resolved) ______"
cat .env