LifeMate — Personal, Family & Learning Companion
build(qa): permit explicit GitHub Pages project-path base without changing Cloudflare default
davoodmehraban89 committed
Oct 15, 2026 at 09:30 UTC
c2e1fd3ae029d34722142cfe5fa9ac840289fa00
1 file changed
+8
-1
scripts/build-cloudflare-pages-qa.sh
+8
-1
@@ -15,7 +15,14 @@ cd apps/lifemate
15
flutter pub get
16
node tool/test_web_bootstrap.mjs
17
node --test tool/test_offline_worker.mjs
18
-flutter build web --release --no-web-resources-cdn --pwa-strategy=none
18
+# Root is the existing Cloudflare behaviour. GitHub Pages QA may require
19
+# a repository subpath before the custom .ir hostname is configured.
20
+LIFEGUIDE_FLUTTER_BASE_HREF="${LIFEGUIDE_FLUTTER_BASE_HREF:-/}"
21
+case "$LIFEGUIDE_FLUTTER_BASE_HREF" in
22
+ /|/LifeMate/) ;;
23
+ *) echo "Unsupported LifeGuide QA base href" >&2; exit 2 ;;
24
+esac
25
+flutter build web --release --no-web-resources-cdn --pwa-strategy=none --base-href "$LIFEGUIDE_FLUTTER_BASE_HREF"
26
node tool/self_host_web.mjs build/web
27
node tool/test_web_bootstrap.mjs
28
test -s build/web/index.html