Appearance
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.).
| Step | What 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 Cloudflare → Workers → Git with the same build command + deploy step.
Develop (content)
bash
cd fifa-agent-mentor/docs-site
npm install
npm run devBuild (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
- Live API and MCP live in the main fifa.qtech.hr worker; the canonical long-form skill is still
fifa-mcp-server.mdon the app host.