## Summary Closes #35. - **Flip deploy workflows** (mirror `dta_webapp`): push/merge to `master` → auto-deploy **beta**; **Deploy Prod** is `workflow_dispatch` only - **Tianji**: `REACT_APP_TIANJI_WEBSITE_ID` + `REACT_APP_DEPLOY_ENV` in `.env.production` / `.env.beta`; Tracker loads page views always on prod/beta - **Consent policy**: page views always live; custom events / identify gated via `analyticsConsent` + `AnalyticsConsentBanner` + `trackEvent`/`identifyUser` helpers (call sites remain #36) - Remove invalid Tianji `<script>` from `index.tsx` (Tracker component owns injection) - README documents beta auto / prod button + Tianji policy ## Ops note — beta Tianji website ID Prod ID unchanged: `cm7x7m52m03kbddswbswrt17y`. `.env.beta` has `REACT_APP_TIANJI_WEBSITE_ID=` empty until a **Hesychia Beta** website is created in Tianji (workspace `cm7w8087y020lddswyhamadj2`). Paste the new id into `.env.beta` before beta page views show under a distinct site. ## Test plan - [x] `npm run test:ci` (106 tests) - [ ] Create Hesychia Beta Tianji website; set `REACT_APP_TIANJI_WEBSITE_ID` in `.env.beta` - [ ] Merge to master → Deploy Beta runs; prod does **not** auto-deploy - [ ] Manual Run workflow on Deploy Prod still works - [ ] Beta build hits `beta.chatbackend` REST/WS; static root `/var/www/beta.chat.aimloperations/html` (8083) - [ ] Prod/beta: tracker.js loads without accepting consent; banner shows until Accept/Decline; `trackEvent` only fires after AcceptReviewed-on: #42
This commit was merged in pull request #42.
This commit is contained in:
@@ -1,15 +1,31 @@
|
||||
name: Deploy Prod
|
||||
|
||||
# Runs after Unit Tests completes on master. Direct pushes only (not PRs).
|
||||
# Manual prod deploy only (mirrors dta_webapp). Push to master deploys beta.
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: [Unit Tests]
|
||||
types: [completed]
|
||||
branches: [master]
|
||||
workflow_dispatch: {}
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
if: gitea.event.workflow_run.conclusion == 'success' && gitea.event.workflow_run.event == 'push'
|
||||
unit-tests:
|
||||
runs-on: self-hosted
|
||||
defaults:
|
||||
run:
|
||||
working-directory: llm-fe
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "20"
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Run unit tests
|
||||
run: npm run test:ci
|
||||
|
||||
deploy-prod:
|
||||
needs: unit-tests
|
||||
runs-on: self-hosted
|
||||
env:
|
||||
SERVER_INFRA_ROOT: /home/westfarn/Documents/repos/server-infra
|
||||
@@ -19,4 +35,4 @@ jobs:
|
||||
"$SERVER_INFRA_ROOT/scripts/deploy.sh" \
|
||||
--app chat_web_app \
|
||||
--env prod \
|
||||
--ref "${{ gitea.event.workflow_run.head_sha }}"
|
||||
--ref "${{ gitea.sha }}"
|
||||
|
||||
Reference in New Issue
Block a user