Skip to content

Publish the documentation on GitHub Pages

This page explains the GitHub Actions workflow provided to automatically publish the QForm Builder Community VitePress documentation on GitHub Pages.

Goal

The documentation should be published from the repository without a manual build step.

Target public URL:

txt
https://vevedh.github.io/qform-builder-layer/

Added file

txt
.github/workflows/docs.yml

GitHub Pages configuration

In the GitHub repository:

txt
Settings → Pages → Build and deployment → Source: GitHub Actions

Automatic base handling

Local development uses:

txt
base: /

The workflow injects:

yaml
VITEPRESS_BASE: '/${{ github.event.repository.name }}/'

For this repository, the generated base is:

txt
/qform-builder-layer/

Provided workflow

The workflow:

  1. checks out the repository;
  2. installs Bun;
  3. installs dependencies;
  4. checks documentation i18n parity;
  5. builds VitePress;
  6. uploads the generated static site;
  7. deploys it to GitHub Pages.

Node.js 24 compatibility

The workflow opts into the future JavaScript actions runtime with:

yaml
env:
  FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true'

It also uses actions/checkout@v6 and actions/configure-pages@v6 to avoid the Node.js 20 deprecation warning.

Local test

bash
bun run docs:build
bun run docs:preview

PowerShell simulation of the GitHub Pages base:

powershell
$env:VITEPRESS_BASE='/qform-builder-layer/'
bun run docs:build
Remove-Item Env:VITEPRESS_BASE

Custom domain case

If a custom domain is used later, set:

txt
VITEPRESS_BASE=/

and add the expected CNAME configuration for GitHub Pages.

Best practices

  • Run bun run docs:i18n:check before committing documentation changes.
  • Keep French and English page trees synchronized.
  • Do not commit docs/.vitepress/dist.
  • Use workflow_dispatch to manually redeploy if necessary.

QForm Builder — reusable Nuxt 4 / Quasar / FormKit layer.