Deploy static sites manually
The four Cloudflare Pages sites (tappass.ai, docs.tappass.ai,
internal-docs.tappass.ai, trust.tappass.ai) normally deploy via
GitHub Actions on push to main. When that pipeline breaks — or you
need a surgical fix without opening a PR — the same deploy is one
wrangler command away.
This runbook is the fallback path. Use CI when CI works.
When to use this
Section titled “When to use this”- GitHub Actions is down / the workflow is broken and there's an externally visible bug (typo, dead link, outdated price).
- You need to verify a Cloudflare Pages configuration change
(
_headers,_redirects, Pages Function) against prod without round-tripping through a PR. - You're bootstrapping a new Pages project for the first time.
Do not use this to bypass code review on day-to-day work — the deploy creates an unreviewed production revision.
Prerequisites (one-time)
Section titled “Prerequisites (one-time)”# 1. Authenticate wrangler against the Cloudflare account that owns# the Pages project. Opens a browser.npx wrangler login
# 2. Confirm you can see the project.npx wrangler pages project listYou should see all four projects listed. If not, you're on the wrong
Cloudflare account — log out and re-wrangler login.
Per-site commands
Section titled “Per-site commands”Each site has its own build shape. Run the command from inside the relevant repo.
tappass.ai — marketing site
Section titled “tappass.ai — marketing site”Static HTML, no build step.
cd tappass.ainpx wrangler pages deploy . \ --project-name tappass-ai \ --commit-dirty=truePages Function lives at functions/api/contact.js (Resend relay).
Wrangler picks it up automatically from the functions/ folder.
docs.tappass.ai — public docs
Section titled “docs.tappass.ai — public docs”Astro Starlight, build output in dist/.
cd docsnpm cinpm run buildnpx wrangler pages deploy dist \ --project-name tappass-docs \ --commit-dirty=trueinternal-docs.tappass.ai — this site
Section titled “internal-docs.tappass.ai — this site”Astro Starlight, build output in dist/. Cloudflare Access gates the
domain, so the deploy is public-to-Pages but the serve is team-only.
cd docs-internalnpm cinpm run buildnpx wrangler pages deploy dist \ --project-name tappass-docs-internal \ --commit-dirty=truetrust.tappass.ai — trust center
Section titled “trust.tappass.ai — trust center”Static HTML (DPA, DPIA, subprocessors). No build step.
cd trust.tappass.ainpx wrangler pages deploy . \ --project-name tappass-trust \ --commit-dirty=trueWhat the flags mean
Section titled “What the flags mean”.ordist— directory to upload. Static sites upload the repo root; Astro/Starlight sites upload the builtdist/.--project-name <name>— the existing Pages project; already wired to the custom domain.--commit-dirty=true— allows deploy with uncommitted changes. Drop this flag if you want wrangler to refuse until you commit (the safer default for non-emergency work).
Verify the deploy
Section titled “Verify the deploy”# 1. Headers + cache status on the apexcurl -sI https://tappass.ai | grep -iE 'HTTP|cf-ray|cache-control'
# 2. Spot-check the page you changedcurl -s https://tappass.ai/company.html | head -20
# 3. If the change touched a Pages Function, exercise itcurl -sX POST https://tappass.ai/api/contact \ -H 'Content-Type: application/json' \ -d '{"email":"test@example.com","message":"runbook verify"}'Rollback
Section titled “Rollback”Every wrangler pages deploy keeps the previous live deployment as a
"preview" with a unique URL. To revert:
- Cloudflare Dashboard → Pages → select the project.
- Deployments tab → pick the last-known-good row.
- ... menu → Rollback to this deployment.
The rollback is instant and doesn't need a new wrangler run. Faster
than redeploying a reverted git state.
Common failure modes
Section titled “Common failure modes”| Symptom | Likely cause | Fix |
|---|---|---|
Project "tappass-ai" not found. | Wrong Cloudflare account | npx wrangler logout && npx wrangler login; confirm with project list |
| Deploy succeeds but apex still shows old content | CF edge cache | Cloudflare Dashboard → Caching → Purge Everything (that project only) |
_redirects syntax error silently breaks routes | Bad rule order or malformed line | Test locally first: npx wrangler pages dev . |
| Pages Function 500 with no logs | Missing env binding (RESEND_API_KEY etc.) | Dashboard → project → Settings → Environment variables; redeploy |
| Astro build fails with stale node_modules | package-lock.json drift | rm -rf node_modules && npm ci before npm run build |
Also see
Section titled “Also see”- Deployments overview — platform-level map of which CI/CD pipeline owns which service.
- Incident response — for when the marketing site is actively down, not just stale.