Enable beta auto-deploy and Tianji consent-gated events (#35)
Unit Tests / test (pull_request) Successful in 14s

Flip workflows so master deploys beta and prod is workflow_dispatch only.
Load distinct Tianji website IDs from env; page views always on, custom events require consent.
This commit is contained in:
2026-07-27 07:27:22 -05:00
parent 28a805404a
commit befe3cdb4c
17 changed files with 639 additions and 30 deletions
+4 -1
View File
@@ -1,7 +1,10 @@
name: Deploy Beta
# Auto-deploy beta after push to master (mirrors dta_webapp).
on:
workflow_dispatch: {}
push:
branches:
- master
jobs:
unit-tests:
+24 -8
View File
@@ -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 }}"