Guides
Deployment
Deploy your Barodoc site to static hosting
Barodoc builds to a static site. Deploy the dist/ folder to any static host.
Build
pnpm build
Output is in dist/. After build, search index is generated with Pagefind (pagefind --site dist if configured).
Vercel
- Push your repo to GitHub.
- In Vercel, import the repository.
- Build command:
pnpm build(ornpm run build) - Output directory:
dist - Install command:
pnpm install(ornpm install) - Deploy.
No extra config needed. Vercel detects Node and runs the build.
Netlify
- Push your repo to GitHub.
- In Netlify, add new site from Git.
- Build command:
pnpm build - Publish directory:
dist - Base directory: leave empty (or set if the docs app is in a subdirectory, e.g.
docs) - Deploy.
Optional: add netlify.toml in the project root:
[build]
command = "pnpm build"
publish = "dist"
GitHub Pages
- In repo Settings → Pages, set source to GitHub Actions.
- Create
.github/workflows/deploy.yml:
name: Deploy to GitHub Pages
on:
push:
branches: [main]
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- run: pnpm install
- run: pnpm build
- uses: actions/upload-pages-artifact@3
with:
path: dist
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- id: deployment
uses: actions/deploy-pages@4
- Push; the workflow will build and deploy. Set Pages URL in repo settings if needed (e.g.
username.github.io/repo-namefor project sites).
Cloudflare Pages
- Push your repo to GitHub.
- In Cloudflare Pages, create a project from Git.
- Build command:
pnpm build - Build output directory:
dist - Root directory: leave empty (or
docsif the app lives in a subdirectory) - Node version: 20 (in Environment variables:
NODE_VERSION=20) - Deploy.
Environment and Node Version
- Use Node 20+ on the host (or set
NODE_VERSION/ENGINE_NODEwhere supported). - No server-side runtime or env vars are required at build time unless your content or config reads them.