☁️

What you'll need

  • Node.js v18 or later
  • npm (comes with Node.js)
  • A Cloudflare account — free tier works perfectly
1

Install dependencies

Clone the repo and install all npm packages.

git clone https://github.com/kachhadiyaraj15/equity_pulse.git
cd equity_pulse
npm install
2

Build the project

Astro compiles all pages and assets into the dist/ folder.

npx astro build

✅ You should see something like: 19 page(s) built in ~16s

3

Authenticate with Cloudflare

Log in to your Cloudflare account via the browser OAuth flow (one-time setup).

npx wrangler login

🔐 A browser window will open. Log in and approve access. Your credentials are saved locally.

4

Deploy to Cloudflare Pages

Upload the dist/ folder to Cloudflare Pages.

npx wrangler pages deploy dist

🚀 First run: Wrangler will ask you to name the project (e.g. equitypulse) and choose a production branch (use main).
Subsequent runs: it deploys instantly without prompts.

One-command deploy (after first setup)

This project has a convenience script that builds and deploys in sequence.

# Using npm script (PowerShell — run separately if && doesn't work):
npx astro build
npx wrangler pages deploy dist

# Or on Mac/Linux/bash:
npm run deploy:ci

📄 wrangler.toml reference

This file at the project root tells Wrangler where to find the built output and which Cloudflare project to target.

name = 'equitypulse'
compatibility_date = '2024-01-01'
pages_build_output_dir = './dist'
  • name — the Cloudflare Pages project name
  • compatibility_date — Workers runtime compat date
  • pages_build_output_dir — folder Wrangler uploads

🛠 Useful Wrangler commands

npx wrangler --version

Check the installed Wrangler version

npx wrangler pages list

List all your Cloudflare Pages projects

npx wrangler pages deployment list

View deployment history for a project

npx wrangler logout

Log out of your Cloudflare account

Your deployment URL

After a successful deploy you'll get two URLs:
Preview: https://<hash>.equitypulse.pages.dev
Production: https://equitypulse.pages.dev

You can also add a custom domain from the Cloudflare Pages dashboard.