feat: bootstrap multi-tenant storefront showcase

This commit is contained in:
2026-06-29 12:06:10 +01:00
commit 1c9e946464
11 changed files with 763 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
name: Deploy storefronts
on:
push:
branches: [main]
workflow_dispatch:
# One job per storefront: each builds its own static export and deploys to its
# own Cloudflare Worker. Keep this matrix in sync with config/stores.ts.
jobs:
deploy:
name: ${{ matrix.worker }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- { code: executive, worker: rubberquack-executive }
- { code: crypto, worker: rubberquack-crypto }
- { code: supper, worker: rubberquack-supper }
- { code: collector, worker: rubberquack-collector }
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install --frozen-lockfile
- name: Build ${{ matrix.code }}
run: |
cp config/store_${{ matrix.code }}.ts config/store.ts
bun run build
env:
NEXT_PUBLIC_STORE_CODE: ${{ matrix.code }}
- name: Deploy ${{ matrix.worker }}
run: bunx wrangler deploy --name ${{ matrix.worker }}
env:
NEXT_PUBLIC_STORE_CODE: ${{ matrix.code }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}