Skip to content

FIFA Agent Mentor — documentation site (VitePress)

This is the VitePress source for https://docs.fifa.qtech.hr. It is not a separate Cloudflare project.

Same Worker as the main app

The production build copies this site into the main app’s dist folder, then the single API Worker you already use — fifa-agent-mentor-api in the Cloudflare dashboard — deploys with one set of Worker secrets (Supabase, xAI, etc.).

StepWhat happens
npm run build (in fifa-agent-mentor/)Vite (spa) + VitePress → then copy into dist/__fifa-docs/
cd worker && wrangler deploy or npm run deploy (from fifa-agent-mentor/)Uploads the same dist (app + __fifa-docs/) to the same Worker

worker/src/bundledDocs.ts answers requests with Host: docs.fifa.qtech.hr from the files under dist/__fifa-docs/. The main site keeps using Host: fifa.qtech.hr as before.

Custom domain: in Cloudflare, attach docs.fifa.qtech.hr to the same Worker fifa-agent-mentor-api (not a second Worker or Pages project). You can remove any standalone “docs” Worker if you created one earlier.

From fifa-agent-mentor/, a single command builds and deploys the Worker (including dist/__fifa-docs/):

bash
npm run deploy

(wrangler login first, if needed.) This runs npm run build then wrangler deploy in worker/. You can also use CloudflareWorkersGit with the same build command + deploy step.

Develop (content)

bash
cd fifa-agent-mentor/docs-site
npm install
npm run dev

Build (also run from repo root as part of npm run build)

bash
npm run build
# output: .vitepress/dist, then the root script copies to ../dist/__fifa-docs/

Source of truth

Last updated: