Skip to content

chore(docs): publish docs site to GitHub Pages#49

Merged
jonmatum merged 1 commit intomainfrom
claude/chore-docs-github-pages
Apr 17, 2026
Merged

chore(docs): publish docs site to GitHub Pages#49
jonmatum merged 1 commit intomainfrom
claude/chore-docs-github-pages

Conversation

@jonmatum
Copy link
Copy Markdown
Owner

Summary

  • Conditional output: 'export' + basePath: '/next-shell' in next.config.ts when GITHUB_PAGES=true — Vercel stays on SSR mode
  • app/page.tsx converted from server redirect() to client-side useRouter.replace (static export doesn't support server redirects)
  • .github/workflows/deploy-docs.yml — builds library → runs fumadocs static export → uploads artifact → deploys to Pages on every main push
  • eslint.config.js adds **/out/** ignore (static export output)
  • apps/docs/.gitignore ignores out/

What is intentionally NOT in this PR

  • Vercel config changes — Vercel keeps serving the SSR version at its own URL
  • Search configuration — fumadocs uses client-side search in static export by default

One-time GitHub setup required

Go to Settings → Pages → Source and set it to "GitHub Actions" (not the default branch/folder option). The workflow will handle the rest automatically.

Docs will be live at: https://jonmatum.github.io/next-shell/docs

Verification

GITHUB_PAGES=true pnpm --filter @jonmatum/next-shell-docs build  ✓ 12 pages exported
pnpm lint     ✓
pnpm typecheck ✓
pnpm test     ✓ 508/508

Setup:
- next.config.ts: add output='export', basePath='/next-shell', and
  images.unoptimized when GITHUB_PAGES=true; Vercel is unaffected since
  it doesn't set that env var
- app/page.tsx: convert server redirect() to client-side useRouter.replace
  so it works in both static export and server-rendered contexts
- .github/workflows/deploy-docs.yml: build library → static export docs →
  upload to GitHub Pages artifact → deploy; triggered on every main push
  and via workflow_dispatch
- eslint.config.js: ignore **/out/** (static export output dir)
- apps/docs/.gitignore: ignore out/ directory

Docs will be live at https://jonmatum.github.io/next-shell/docs once
GitHub Pages source is configured to "GitHub Actions" in repo settings.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@jonmatumdev jonmatumdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All checks passed. AI review found no issues. Auto-approved.

@jonmatum jonmatum merged commit 34121e8 into main Apr 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants