deployment-guide, github-pages, documentation
Guide for deploying the @adi-family/http documentation to GitHub Pages.
The documentation is automatically deployed to GitHub Pages on every push to the main branch.
-
Enable GitHub Pages (one-time setup):
- Go to your repository on GitHub:
https://github.com/adi-family/http - Navigate to Settings → Pages
- Under Source, select: GitHub Actions
- Save the settings
- Go to your repository on GitHub:
-
Push to main branch:
git push origin main
-
Monitor deployment:
- Go to Actions tab in your repository
- You'll see the "Deploy Documentation" workflow running
- Once complete (2-3 minutes), docs are live!
-
Access your documentation:
https://adi-family.github.io/http/
The .github/workflows/deploy-docs.yml workflow:
- ✅ Triggers on push to
mainbranch - ✅ Installs dependencies with Bun
- ✅ Builds VitePress documentation
- ✅ Deploys to GitHub Pages automatically
You can also trigger deployment manually:
- Go to Actions tab on GitHub
- Select Deploy Documentation workflow
- Click Run workflow
- Select
mainbranch - Click Run workflow button
Before pushing, preview your documentation locally:
# Development server with hot reload
bun run docs:dev
# Build and preview production version
bun run docs:build
bun run docs:previewTo use a custom domain like docs.adi-family.com:
-
Add CNAME file:
echo "docs.adi-family.com" > docs/public/CNAME
-
Configure DNS (at your domain provider):
Type: CNAME Name: docs Value: adi-family.github.io -
Update VitePress config (
docs/.vitepress/config.ts):export default defineConfig({ // Remove or update base base: '/', sitemap: { hostname: 'https://docs.adi-family.com' } })
-
Configure in GitHub:
- Settings → Pages → Custom domain
- Enter:
docs.adi-family.com - Wait for DNS check
- Enable "Enforce HTTPS"
Check the workflow logs:
- Go to Actions tab
- Click on the failed workflow
- Check the error messages
Common issues:
- Pages not enabled: Enable GitHub Pages in Settings
- Wrong permissions: Ensure workflow has
pages: writepermission - Build errors: Run
bun run docs:buildlocally to debug
Issue: Site shows 404 errors
Solution:
- Verify
base: '/http/'indocs/.vitepress/config.ts - Repository name must match the base path
Issue: CSS/JS files return 404
Solution:
- Check
basepath in config matches repository name - Clear browser cache
- Check browser console for error details
Wait a few minutes - GitHub Pages can take 2-3 minutes to update
Hard refresh:
- Windows/Linux:
Ctrl + Shift + R - Mac:
Cmd + Shift + R
Check workflow:
- Go to Actions tab
- Verify latest workflow succeeded
- Check deployment timestamp
Before pushing documentation changes:
- Test locally with
bun run docs:dev - Build succeeds:
bun run docs:build - Preview production build:
bun run docs:preview - Check all links work
- Verify code examples are correct
- Review spelling and grammar
- Commit and push to main
- Import repository on Vercel
- Set build command:
bun run docs:build - Set output directory:
docs/.vitepress/dist - Deploy
- Import repository on Netlify
- Set build command:
bun run docs:build - Set publish directory:
docs/.vitepress/dist - Deploy
- Connect repository on Cloudflare Pages
- Set build command:
bun run docs:build - Set output directory:
docs/.vitepress/dist - Deploy
- Production: https://adi-family.github.io/http/
- Repository: https://github.com/adi-family/http
- npm Package: https://www.npmjs.com/package/@adi-family/http
If you encounter issues:
- Check GitHub Actions logs
- Review VitePress documentation: https://vitepress.dev/
- Open an issue: https://github.com/adi-family/http/issues