Vitebook is a static-site generator, so it can be virtually deployed on any hosting provider that supports Node.js version >=16. We recommend Netlify, but feel free to use whatever you like.

  • Build command: npm run vitebook:build
  • Output Directory: .vitebook/dist
  • Minimum Node.js Version: 16


You can configure the Netlify deployment either via the website, or with a local netlify.toml file.

  command = "npm run vitebook:build"
  publish = ".vitebook/dist"


GitHub Pages

Set the correct baseUrl.

  • If you are deploying to https://<USERNAME>, you can omit this step as the base defaults to /.
  • If you are deploying to https://<USERNAME><REPO>/, for example your repository is at<USERNAME>/<REPO>, then set base to /<REPO>/.
import { defineConfig } from '@vitebook/client/node';

export default defineConfig({
  // ...
  site: {
    baseUrl: '/<REPO>',
    // ...


Create a GitHub workflow at .github/workflows/vitebook.yml...

name: Vitebook

    branches: [main]

    runs-on: ubuntu-latest

      - uses: actions/checkout@v2
          fetch-depth: 0

      - name: Setup Node.js
        uses: actions/setup-node@v2
          node-version: '16'

      - name: Cache node modules
        uses: actions/cache@v2
          cache-name: cache-node-modules
          path: ~/.npm
          key: #123;{ runner.os }}-npm-#123;{ hashFiles('**/package-lock.json') }}
          restore-keys: |
            #123;{ runner.os }}-npm-

      - name: Install dependencies
        run: npm ci

      - name: Build Vitebook
        run: npm run vitebook:build

      - name: Deploy to GitHub Pages
        uses: crazy-max/ghaction-github-pages@v2
          target_branch: gh-pages
          build_dir: .vitebook/dist
          GITHUB_TOKEN: #123;{ secrets.GITHUB_TOKEN }}