Enable beta auto-deploy on master; prod via manual button
CI / test (pull_request) Successful in 10s
Unit Tests / test (pull_request) Successful in 9s

Closes #26. Split deploy.yml into deploy-beta (push→master) and
deploy-prod (workflow_dispatch), wire beta hosts/CORS defaults, and
document beta secret + Tianji coordination with chat_web_app.
This commit is contained in:
2026-07-27 10:26:21 -05:00
parent acb3a51618
commit 02cee6c220
7 changed files with 176 additions and 28 deletions
@@ -59,3 +59,11 @@ class CapacitorWebviewOriginTests(SimpleTestCase):
from django.conf import settings
self.assertFalse(settings.CORS_ALLOW_CREDENTIALS)
def test_default_cors_includes_beta_frontend(self):
from django.conf import settings
self.assertIn(
"https://beta.chat.aimloperations.com",
settings.CORS_ALLOWED_ORIGINS,
)
+5 -2
View File
@@ -122,7 +122,9 @@ DEBUG = env_bool("DJANGO_DEBUG", DJANGO_ENV == "dev")
allowed_hosts = env_list(
"DJANGO_ALLOWED_HOSTS",
"localhost,127.0.0.1,0.0.0.0,chatbackend.aimloperations.com,chat.aimloperations.com",
"localhost,127.0.0.1,0.0.0.0,"
"chatbackend.aimloperations.com,chat.aimloperations.com,"
"beta.chatbackend.aimloperations.com,beta.chat.aimloperations.com",
)
ALLOWED_HOSTS = allowed_hosts if allowed_hosts else ["*"]
@@ -139,7 +141,8 @@ CORS_ORIGIN_ALLOW_ALL = env_bool("CORS_ORIGIN_ALLOW_ALL", True)
CORS_ALLOWED_ORIGINS = with_capacitor_webview_origins(
env_list(
"CORS_ALLOWED_ORIGINS",
"http://localhost:3000,http://127.0.0.1:3000,https://chat.aimloperations.com",
"http://localhost:3000,http://127.0.0.1:3000,"
"https://chat.aimloperations.com,https://beta.chat.aimloperations.com",
)
)