Deploy to GitHub Pages¶
| Site | URL |
|---|---|
| Web dashboard | https://fasterapiweb.github.io/laughing-chainsaw/ |
| Documentation (MkDocs) | https://fasterapiweb.github.io/laughing-chainsaw/docs/ |
One-time GitHub setup¶
- Repo → Settings → Pages
-
Source: GitHub Actions (not “Deploy from branch”)
-
Repo → Settings → Secrets and variables → Actions → Variables tab → New repository variable:
| Name | Value |
|---|---|
NEXT_PUBLIC_SUPABASE_URL | https://YOUR_REF.supabase.co |
NEXT_PUBLIC_SUPABASE_ANON_KEY | anon key from Supabase dashboard |
Use the same values as backend/supabase/.env (never commit those files).
- Supabase → Authentication → URL Configuration:
- Site URL:
https://fasterapiweb.github.io/laughing-chainsaw/ -
Redirect URLs: add
https://fasterapiweb.github.io/laughing-chainsaw/** -
For local dev, keep separate URLs:
- Site URL can stay
http://localhost:3000while developing locally - Production users hit GitHub Pages — add both redirect URLs if you use email confirm
Deploy¶
Push to main — workflow .github/workflows/deploy-pages.yml builds the web app and MkDocs docs into one Pages artifact.
Manual trigger: Actions → Deploy Pages → Run workflow.
Verify¶
- Actions tab shows green build
- Open https://fasterapiweb.github.io/laughing-chainsaw/
- Sign up / log in
- Import data → Settings → Sync Now
- Check Supabase Table Editor for new rows
Troubleshooting¶
| Issue | Fix |
|---|---|
| Build fails on pnpm | Ensure pnpm-lock.yaml is committed |
| Auth works locally but not on Pages | Add Pages URL to Supabase redirect URLs |
| Cloud sync disabled on Pages | Set GitHub Actions variables (step 2) |
| 404 on routes | basePath is /laughing-chainsaw — use full path URLs |
See also SETUP_CLOUD.md for Supabase + sync setup.