Appearance
Frontend deployment
Static Vue build on Cloudflare Pages. No server, no cookies, no server-side rendering.
Pre-flight
Before wiring CI, confirm in a local build:
bun run build(notbun run build:curation— that's a 5MB curator-only tool build that bundles pdf.js and talks to the loopback-only Curation API; it must never ship publicly).- Output directory is
dist/(Vite default). VITE_APP_API_URLis read insrc/resources/HttpRequest.tsas the axiosbaseURL— it has to point at the deployed API's public hostname, notlocalhost.
Cloudflare Pages project
- Cloudflare dashboard → Workers & Pages → create a Pages project,
chem-assistant-frontend, connected toredcats002/chem-assistant-frontend(or left disconnected from Git and deployed only viawrangler pages deploy, which is what the CI workflow does — either works, but don't do both, or you get two competing deploy paths). - Add a custom domain:
app.chemassist-occ.com. - Set the repo variable (not secret — it's inlined at build time, and it's not sensitive)
VITE_APP_API_URL=https://api.chemassist-occ.comin the frontend repo's Settings → Secrets and variables → Actions → Variables tab. - Add secrets
CF_API_TOKEN(a token scoped to Cloudflare Pages — Edit) andCF_ACCOUNT_ID.
CI/CD
.github/workflows/deploy.yml: push:main and pull_request (PRs get a preview deploy). lint → test → build (with VITE_APP_API_URL baked in) → wrangler pages deploy dist. Uses the raw wrangler CLI rather than cloudflare/wrangler-action, deliberately — the action swallows wrangler's stderr, which hides the real reason a deploy failed.
PR previews
A PR push deploys to <branch>.chem-assistant-frontend.pages.dev. Since there's no auth cookie to worry about, previews can call the real production API if CORS_ORIGIN on the API allows *.pages.dev — or keep it strict to app.chemassist-occ.com and treat previews as visual-only. Pick one and set CORS_ORIGIN accordingly; it isn't decided by this page.
Rollback
Cloudflare Pages keeps every deployment. Dashboard → the project → Deployments → pick a prior one → "Rollback to this deployment". No CI involvement needed.