-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Labels
enhancementNew feature or requestNew feature or request
Description
🚀 Feature Description
Add the ability to connect a GitHub account and deploy the exported Bento page directly to GitHub Pages with one click, without leaving OpenBento.
💡 Problem / Motivation
Currently, deploying an exported Bento page to GitHub Pages requires:
- Exporting the project as a ZIP
- Extracting and opening in an IDE
- Creating a GitHub repository manually
- Pushing the code
- Configuring GitHub Pages
- Waiting for the build
This is tedious for non-technical users who just want their link-in-bio page live. A one-click deploy would make OpenBento accessible to everyone.
📋 Proposed Solution
1. GitHub Authentication (Device Flow)
Use GitHub's Device Flow authentication which works without a backend:
- User clicks "Deploy to GitHub" in the export section
- App shows a code and opens
github.com/login/device - User enters the code on GitHub
- App receives the access token
- Token stored in localStorage (user can revoke anytime)
Why Device Flow:
- No backend/server required
- Works with static apps
- Secure (token exchange happens on GitHub)
- User clearly sees what permissions they grant
2. Deploy flow
Once connected:
- Choose repo name: e.g.,
my-bentoorlinks - Click Deploy: App generates the export files, creates repo, pushes code
- Automatic setup: GitHub Actions workflow deploys to Pages
- Get URL: User receives their live URL (
username.github.io/my-bento)
3. Update existing deployment
For users who already deployed:
- Sync button: Push latest changes to the same repo
- No re-authentication: Token already stored
- Automatic rebuild: GitHub Actions handles the rest
4. UI in export section
Add "Deploy to GitHub Pages" alongside existing export options:
- Not connected: "Connect GitHub" button with explanation
- Connected: Show GitHub username + "Deploy" button
- After deploy: Show live URL + "Update" button for future changes
🔄 Alternatives Considered
- OAuth App with backend: Requires server for token exchange
- Personal Access Token: Less user-friendly, security concerns
- Manual export only: Current approach, works but tedious
⚠️ Considerations
- Permissions: Request minimal scopes (
public_repo,workflow) - Token storage: Stored in localStorage, user can disconnect anytime
- Rate limits: GitHub API has rate limits (5000 req/hour authenticated)
- Repo naming: Validate repo name, suggest
username.github.iofor root domain
📝 Additional Context
What gets deployed:
- The generated React/Vite project (same as ZIP export)
- Includes the
.github/workflows/deploy.ymlfor automatic builds - User's Bento page, NOT the OpenBento builder
GitHub Device Flow documentation:
New files to create:
services/github/auth.ts- Device Flow authenticationservices/github/deploy.ts- Repo creation, file push, Pages setupcomponents/GitHubDeploySection.tsx- UI in export modal
Files to modify:
- Export modal/section - Add GitHub deploy option
Environment variables:
VITE_GITHUB_CLIENT_ID- OAuth App client ID (public, safe to expose)
✅ Checklist
- I have searched for existing issues to avoid duplicates
- I have read the Contributing Guide
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request