Skip to content

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.

  • 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.

Terminal window
# 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 list

You should see all four projects listed. If not, you're on the wrong Cloudflare account — log out and re-wrangler login.

Each site has its own build shape. Run the command from inside the relevant repo.

Static HTML, no build step.

Terminal window
cd tappass.ai
npx wrangler pages deploy . \
--project-name tappass-ai \
--commit-dirty=true

Pages Function lives at functions/api/contact.js (Resend relay). Wrangler picks it up automatically from the functions/ folder.

Astro Starlight, build output in dist/.

Terminal window
cd docs
npm ci
npm run build
npx wrangler pages deploy dist \
--project-name tappass-docs \
--commit-dirty=true

Astro Starlight, build output in dist/. Cloudflare Access gates the domain, so the deploy is public-to-Pages but the serve is team-only.

Terminal window
cd docs-internal
npm ci
npm run build
npx wrangler pages deploy dist \
--project-name tappass-docs-internal \
--commit-dirty=true

Static HTML (DPA, DPIA, subprocessors). No build step.

Terminal window
cd trust.tappass.ai
npx wrangler pages deploy . \
--project-name tappass-trust \
--commit-dirty=true
  • . or dist — directory to upload. Static sites upload the repo root; Astro/Starlight sites upload the built dist/.
  • --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).
Terminal window
# 1. Headers + cache status on the apex
curl -sI https://tappass.ai | grep -iE 'HTTP|cf-ray|cache-control'
# 2. Spot-check the page you changed
curl -s https://tappass.ai/company.html | head -20
# 3. If the change touched a Pages Function, exercise it
curl -sX POST https://tappass.ai/api/contact \
-H 'Content-Type: application/json' \
-d '{"email":"test@example.com","message":"runbook verify"}'

Every wrangler pages deploy keeps the previous live deployment as a "preview" with a unique URL. To revert:

  1. Cloudflare Dashboard → Pages → select the project.
  2. Deployments tab → pick the last-known-good row.
  3. ... menu → Rollback to this deployment.

The rollback is instant and doesn't need a new wrangler run. Faster than redeploying a reverted git state.

SymptomLikely causeFix
Project "tappass-ai" not found.Wrong Cloudflare accountnpx wrangler logout && npx wrangler login; confirm with project list
Deploy succeeds but apex still shows old contentCF edge cacheCloudflare Dashboard → Caching → Purge Everything (that project only)
_redirects syntax error silently breaks routesBad rule order or malformed lineTest locally first: npx wrangler pages dev .
Pages Function 500 with no logsMissing env binding (RESEND_API_KEY etc.)Dashboard → project → Settings → Environment variables; redeploy
Astro build fails with stale node_modulespackage-lock.json driftrm -rf node_modules && npm ci before npm run build