mirror of
https://github.com/open-jarvis/OpenJarvis.git
synced 2026-07-28 14:07:55 +00:00
PyPI publishing had been broken since v1.0.3.dev851: #587 made VITE_SUPABASE_ANON_KEY a hard build-time requirement, but no such secret exists, so the frontend build aborted every publish run before the PyPI upload. Decouple package buildability from the leaderboard credential: a missing anon key now disables the savings leaderboard at runtime instead of failing the build, and auto-enables when the secret is provided. Verified: npm run build with the key unset succeeds; tsc + vitest pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
43 lines
1.0 KiB
YAML
43 lines
1.0 KiB
YAML
name: Frontend CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'frontend/**'
|
|
- '.github/workflows/frontend.yml'
|
|
pull_request:
|
|
branches: [main]
|
|
paths:
|
|
- 'frontend/**'
|
|
- '.github/workflows/frontend.yml'
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: frontend-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: frontend
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: '22'
|
|
cache: 'npm'
|
|
cache-dependency-path: frontend/package-lock.json
|
|
|
|
- run: npm ci
|
|
- run: npx tsc --noEmit
|
|
- run: npm run build
|
|
env:
|
|
# Optional: when the secret is unset the build still succeeds and the
|
|
# leaderboard is disabled (see src/lib/supabase.ts). No placeholder,
|
|
# so a keyless CI build doesn't bake in a bogus anon key.
|
|
VITE_SUPABASE_ANON_KEY: ${{ secrets.VITE_SUPABASE_ANON_KEY }}
|