|
| 1 | +# GitHub Pages Deployment Guide |
| 2 | + |
| 3 | +This Next.js app is configured for deployment to GitHub Pages at `https://open-superintelligence-lab.github.io/Open-Superintelligence-Lab.github.io/`. |
| 4 | + |
| 5 | +## ✅ What's Fixed |
| 6 | + |
| 7 | +1. **Base Path Configuration**: Updated `next.config.ts` with correct `basePath` and `assetPrefix` |
| 8 | +2. **Tailwind CSS**: Verified content paths include `./app/**/*.{js,ts,jsx,tsx,mdx}` |
| 9 | +3. **GitHub Actions**: Created automatic deployment workflow |
| 10 | +4. **Build Process**: Fixed Turbopack issues and PostCSS configuration |
| 11 | + |
| 12 | +## 🚀 Deployment Methods |
| 13 | + |
| 14 | +### Method 1: Automatic (Recommended) |
| 15 | +The GitHub Actions workflow will automatically deploy when you push to the `main` branch: |
| 16 | + |
| 17 | +1. Push your changes to `main` |
| 18 | +2. The workflow will build and deploy automatically |
| 19 | +3. Your site will be available at: `https://open-superintelligence-lab.github.io/Open-Superintelligence-Lab.github.io/` |
| 20 | + |
| 21 | +### Method 2: Manual Deployment |
| 22 | +```bash |
| 23 | +# Build for production |
| 24 | +npm run build:prod |
| 25 | + |
| 26 | +# Serve locally to test |
| 27 | +npm run serve:out |
| 28 | + |
| 29 | +# The built files are in the `out/` directory |
| 30 | +# Push the contents of `out/` to your `gh-pages` branch |
| 31 | +``` |
| 32 | + |
| 33 | +## 🔧 Local Testing |
| 34 | + |
| 35 | +To test the production build locally: |
| 36 | + |
| 37 | +```bash |
| 38 | +# Build with production settings |
| 39 | +npm run build:prod |
| 40 | + |
| 41 | +# Serve the built files |
| 42 | +npm run serve:out |
| 43 | +``` |
| 44 | + |
| 45 | +## 📁 Key Files |
| 46 | + |
| 47 | +- `next.config.ts` - Contains basePath and assetPrefix configuration |
| 48 | +- `.github/workflows/deploy.yml` - GitHub Actions deployment workflow |
| 49 | +- `tailwind.config.js` - Tailwind CSS configuration with correct content paths |
| 50 | +- `postcss.config.mjs` - PostCSS configuration for CSS processing |
| 51 | + |
| 52 | +## 🐛 Troubleshooting |
| 53 | + |
| 54 | +If CSS is missing on GitHub Pages: |
| 55 | + |
| 56 | +1. ✅ Check `basePath` matches your repo name exactly |
| 57 | +2. ✅ Verify `assetPrefix` has trailing slash |
| 58 | +3. ✅ Ensure Tailwind content paths include all your component directories |
| 59 | +4. ✅ Make sure you're deploying the `out/` folder, not `.next/` |
| 60 | + |
| 61 | +## 🌐 Your Site URL |
| 62 | + |
| 63 | +Once deployed, your site will be available at: |
| 64 | +`https://open-superintelligence-lab.github.io/Open-Superintelligence-Lab.github.io/` |
0 commit comments