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.ymlGitHub Pages configuration
In the GitHub repository:
txt
Settings → Pages → Build and deployment → Source: GitHub ActionsAutomatic 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:
- checks out the repository;
- installs Bun;
- installs dependencies;
- checks documentation i18n parity;
- builds VitePress;
- uploads the generated static site;
- 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:previewPowerShell simulation of the GitHub Pages base:
powershell
$env:VITEPRESS_BASE='/qform-builder-layer/'
bun run docs:build
Remove-Item Env:VITEPRESS_BASECustom 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:checkbefore committing documentation changes. - Keep French and English page trees synchronized.
- Do not commit
docs/.vitepress/dist. - Use
workflow_dispatchto manually redeploy if necessary.