Skip to content

Commit e6a309c

Browse files
committed
Add GitHub Pages deploy config
1 parent ebc521a commit e6a309c

2 files changed

Lines changed: 66 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: false
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Bun
26+
uses: oven-sh/setup-bun@v2
27+
with:
28+
bun-version: latest
29+
30+
- name: Install dependencies
31+
run: bun install
32+
33+
- name: Build
34+
env:
35+
BUN_PUBLIC_SUPABASE_URL: ${{ secrets.BUN_PUBLIC_SUPABASE_URL }}
36+
BUN_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.BUN_PUBLIC_SUPABASE_ANON_KEY }}
37+
run: bun run build
38+
39+
- name: Setup Pages
40+
uses: actions/configure-pages@v5
41+
42+
- name: Upload artifact
43+
uses: actions/upload-pages-artifact@v3
44+
with:
45+
path: ./dist
46+
47+
deploy:
48+
environment:
49+
name: github-pages
50+
url: ${{ steps.deployment.outputs.page_url }}
51+
runs-on: ubuntu-latest
52+
needs: build
53+
steps:
54+
- name: Deploy to GitHub Pages
55+
id: deployment
56+
uses: actions/deploy-pages@v4
57+

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,12 @@ The application uses two tables:
6060
- `answers`: WebRTC answer SDP linked to an offer
6161

6262
See `supabase-schema.sql` for the complete schema definition.
63+
64+
## GitHub Pages Deployment
65+
66+
The app automatically deploys to GitHub Pages on push to `main`. Configure these secrets in **Settings → Secrets and variables → Actions**:
67+
68+
- `BUN_PUBLIC_SUPABASE_URL` - Your Supabase project URL (from Settings → API)
69+
- `BUN_PUBLIC_SUPABASE_ANON_KEY` - Your Supabase anon key (from Settings → API)
70+
71+
Enable GitHub Pages in repository settings and select "GitHub Actions" as the source.

0 commit comments

Comments
 (0)