|
| 1 | +# GitHub Pages Deployment for RowState |
| 2 | + |
| 3 | +## Automatic Deployment Setup |
| 4 | + |
| 5 | +This repository is configured to automatically deploy to GitHub Pages whenever you push to the `main` branch. |
| 6 | + |
| 7 | +## Setup Instructions |
| 8 | + |
| 9 | +### 1. Enable GitHub Pages |
| 10 | + |
| 11 | +1. Go to your repository on GitHub |
| 12 | +2. Click **Settings** → **Pages** (in the left sidebar) |
| 13 | +3. Under **Source**, select **GitHub Actions** |
| 14 | +4. Save the settings |
| 15 | + |
| 16 | +### 2. Push Your Code |
| 17 | + |
| 18 | +```bash |
| 19 | +git add . |
| 20 | +git commit -m "Add GitHub Pages deployment" |
| 21 | +git push origin main |
| 22 | +``` |
| 23 | + |
| 24 | +The GitHub Action will automatically: |
| 25 | +- Build your app |
| 26 | +- Deploy to GitHub Pages |
| 27 | +- Make it available at: `https://[your-username].github.io/RowState/` |
| 28 | + |
| 29 | +### 3. Access Your Deployed App |
| 30 | + |
| 31 | +After the deployment completes (check the **Actions** tab), your app will be live at: |
| 32 | + |
| 33 | +``` |
| 34 | +https://[your-username].github.io/RowState/ |
| 35 | +``` |
| 36 | + |
| 37 | +Replace `[your-username]` with your GitHub username. |
| 38 | + |
| 39 | +## Important Notes |
| 40 | + |
| 41 | +### Browser Compatibility for Bluetooth |
| 42 | + |
| 43 | +⚠️ **Web Bluetooth API limitations:** |
| 44 | +- ✅ **Works:** Chrome/Edge on desktop and Android |
| 45 | +- ❌ **Doesn't work:** Firefox, Safari, iOS browsers |
| 46 | + |
| 47 | +Your rowing monitor and heart rate monitor will only connect on supported browsers. |
| 48 | + |
| 49 | +### Manual Deployment |
| 50 | + |
| 51 | +You can also trigger deployment manually: |
| 52 | +1. Go to **Actions** tab in GitHub |
| 53 | +2. Select **Deploy to GitHub Pages** workflow |
| 54 | +3. Click **Run workflow** |
| 55 | + |
| 56 | +### Local Testing |
| 57 | + |
| 58 | +To test the production build locally: |
| 59 | + |
| 60 | +```bash |
| 61 | +npm run build |
| 62 | +npm run preview |
| 63 | +``` |
| 64 | + |
| 65 | +## Troubleshooting |
| 66 | + |
| 67 | +### If the base path is wrong: |
| 68 | + |
| 69 | +Edit `vite.config.ts` and change the `base` value to match your repository name: |
| 70 | + |
| 71 | +```typescript |
| 72 | +base: '/YourRepoName/', |
| 73 | +``` |
| 74 | + |
| 75 | +### If deployment fails: |
| 76 | + |
| 77 | +1. Check the **Actions** tab for error logs |
| 78 | +2. Ensure GitHub Pages is enabled in repository settings |
| 79 | +3. Verify the workflow has proper permissions |
0 commit comments