# Full rebuild and deploy
/opt/deploy-veripath-site.sh
The script performs:
git pull origin main — pulls latest content from Forgejonpm install — ensures dependencies (e.g. marked, yaml)node build.mjs — generates static HTML from all markdown files/var/www/veripath/nginx -t && systemctl reload nginxbuild.mjs)Location: /root/work/veripath-site/build.mjs
Inputs: content/ directory (markdown files with YAML frontmatter)
Outputs: dist/ directory (static HTML + assets)
| Source | Output | Notes |
|---|---|---|
content/pages/home.md |
/index.html |
Homepage with hero, services, pricing, migration |
content/pages/*.md |
/<slug>/index.html |
Generic content pages |
content/policies/*.md |
/policies/<slug>/index.html |
Public policies (visibility: public) |
content/policies/*.md |
/internal/policies/<slug>/index.html |
Internal policies (visibility: internal) |
content/blog/*.md |
/blog/<slug>/index.html |
Blog posts |
content/business-plan/*.md |
/internal/business-plan/<slug>/index.html |
Staff-only |
content/user-manuals/*.md |
/guides/<slug>/index.html |
Auth-gated |
content/user-guide/*.md |
/user-guide/<slug>/index.html |
Public |
Policies with status: draft are skipped entirely — no HTML is generated.
When content is published via Decap CMS (or pushed directly to Forgejo), a webhook fires:
Forgejo push → git.veripath.co.uk/webhooks/deploy → port 3051 → deploy-webhook.js
→ /opt/deploy-veripath-site.sh
This ensures the live site is always up to date within seconds of a content change.
A cron job runs every minute to check that backend services are alive:
* * * * * /opt/restart-services.sh
File: /opt/restart-services.sh
Checks ports 3052, 3053, 3054 and restarts any that are down.