Action Required — Fix Pages Output Directory
TypeScript build passes clean. Pages deployment fails because the output directory is set to "dist " (trailing space). Fix in Cloudflare Pages settings before deploying.
Fix Pages Output Directory (One-Time)
1. Cloudflare Pages Dashboard → hvac-portal → Settings → Build & deployments
2. Build output directory: change "dist " → "dist" (remove trailing space)
3. Save — Pages auto-redeploys from current commit 823037d
Full Deployment Commands
cd "E:\Claude_Projects\sonan-trackers\hvac-portal"
# 1. Apply D1 migrations
npx wrangler d1 migrations apply hvac_db --remote --env procomfort
# 2. Set JWT_SECRET
npx wrangler secret put JWT_SECRET --env procomfort
# 3. Deploy Worker
npx wrangler deploy --env procomfort
# 4. Push to GitHub (triggers Pages rebuild)
git push origin 823037d4ef422b5761c86c6ce06e5aec71d4d45d:refs/heads/main
Pages Settings
| Setting | Value |
|---|---|
| GitHub repo + branch | sonantechai/hvac-portal → main |
| Build command | npm run build |
| Output directory | dist (no trailing space) |
| Env var | VITE_API_URL = https://procomfort-api.sonandigital.com |
Custom Domain
After Pages first successful build: Pages project → Custom Domains → Add procomfort.sonandigital.com.
Post-Deploy First Login
Default password: Admin@2026. Change immediately. Update business name, emergency phone, service types, and address in Settings.