Skip to content

Commit 96ac188

Browse files
committed
fix: /discover page 404 + enable Stripe on production deploy
- Add missing app/(general)/discover/page.tsx → redirects to /discover/upcoming - Fix [from]/page.tsx invalid-param redirect target (/discover → /discover/upcoming) - Configure deploy-prod.yml with STRIPE_LIVE_SECRET_KEY injection (idempotent) - Enable ZENAO_PAID_EVENTS_ENABLED=true on production VPS The /discover route broke during file structure refactoring (#918). Stripe is now enabled on both staging (test key) and production (live key).
1 parent a69f687 commit 96ac188

File tree

4 files changed

+20
-1
lines changed

4 files changed

+20
-1
lines changed

.github/workflows/deploy-prod.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,16 @@ jobs:
7474
script: |
7575
set -xe
7676
cd zenao
77+
78+
# Inject Stripe env vars into backend.env (idempotent)
79+
grep -q '^ZENAO_STRIPE_SECRET_KEY=' backend.env 2>/dev/null && \
80+
sed -i 's|^ZENAO_STRIPE_SECRET_KEY=.*|ZENAO_STRIPE_SECRET_KEY=${{ secrets.STRIPE_LIVE_SECRET_KEY }}|' backend.env || \
81+
echo 'ZENAO_STRIPE_SECRET_KEY=${{ secrets.STRIPE_LIVE_SECRET_KEY }}' >> backend.env
82+
83+
grep -q '^ZENAO_PAID_EVENTS_ENABLED=' backend.env 2>/dev/null && \
84+
sed -i 's|^ZENAO_PAID_EVENTS_ENABLED=.*|ZENAO_PAID_EVENTS_ENABLED=true|' backend.env || \
85+
echo 'ZENAO_PAID_EVENTS_ENABLED=true' >> backend.env
86+
7787
docker compose -f prod.backend.docker-compose.yml up -d --wait otel-collector jaeger
7888
git restore prod.backend.docker-compose.yml
7989
docker compose -f prod.backend.docker-compose.yml up -d --build backend

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
4949
- **PR #1017 closed**: Draft "Add langage button" superseded by locale switching (`bd4bb88e`)
5050
- **Unused flag cleanup**: Removed `NEXT_PUBLIC_PAID_EVENTS_ENABLED` — never referenced in frontend code, backend flag is the sole gate
5151
- **Staging Stripe config**: `deploy-staging.yml` now injects `ZENAO_STRIPE_SECRET_KEY` + `ZENAO_PAID_EVENTS_ENABLED=true` into VPS `backend.env` during deploy
52+
- **Production Stripe config**: `deploy-prod.yml` injects live Stripe key into production VPS `backend.env`
53+
54+
### Fixed
55+
- **/discover page 404**: Added missing `page.tsx` redirect to `/discover/upcoming` — the route broke during file structure refactoring (#918)
5256

5357
---
5458

app/(general)/discover/[from]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default async function DiscoverPage({ params }: PageProps) {
2424
const now = Date.now() / 1000;
2525

2626
if (from !== "upcoming" && from !== "past") {
27-
redirect("/discover", RedirectType.replace);
27+
redirect("/discover/upcoming", RedirectType.replace);
2828
}
2929

3030
queryClient.prefetchInfiniteQuery(

app/(general)/discover/page.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { redirect, RedirectType } from "next/navigation";
2+
3+
export default function DiscoverPage() {
4+
redirect("/discover/upcoming", RedirectType.replace);
5+
}

0 commit comments

Comments
 (0)