feat: add live demo dashboard on GitHub Pages

Add a demo mode to the dashboard that fetches graph data from Supabase
Storage instead of the local Vite dev server, bypasses the token gate,
and deploys alongside the homepage at /Understand-Anything/demo/.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Lum1104
2026-04-03 11:49:00 +08:00
co-authored by Claude Opus 4.6
parent 2ec1c37efa
commit d6a80224b6
5 changed files with 85 additions and 10 deletions
+16 -1
View File
@@ -5,6 +5,8 @@ on:
branches: [main]
paths:
- 'homepage/**'
- 'understand-anything-plugin/packages/dashboard/**'
- 'understand-anything-plugin/packages/core/**'
- '.github/workflows/deploy-homepage.yml'
workflow_dispatch:
@@ -34,10 +36,23 @@ jobs:
- name: Install dependencies
run: pnpm install
- name: Build
- name: Build homepage
working-directory: homepage
run: pnpm build
- name: Build core
run: pnpm --filter @understand-anything/core build
- name: Build demo dashboard
run: pnpm --filter @understand-anything/dashboard build:demo
env:
VITE_GRAPH_URL: ${{ vars.DEMO_GRAPH_URL }}
VITE_DOMAIN_GRAPH_URL: ${{ vars.DEMO_DOMAIN_GRAPH_URL }}
VITE_META_URL: ${{ vars.DEMO_META_URL }}
- name: Merge demo into homepage output
run: cp -r understand-anything-plugin/packages/dashboard/dist homepage/dist/demo
- uses: actions/upload-pages-artifact@v3
with:
path: homepage/dist