Pular para o conteúdo principal

Deployment Environment

Architecture

Your site runs on Cloudflare Workers with SSR (Server-Side Rendering):

  • Workers — Handle SSR requests and serve the app
  • R2 — Stores static assets (JS, CSS, images)
  • CDN — Cloudflare's global network delivers content fast

Environment variables

In production, environment variables are managed in the Cloudflare Workers dashboard by the Cactus team:

VariableDescription
API_BASE_URLYour production API URL
ORIGIN_DOMAINYour brand's production domain
BRAND_LANGUAGEDefault language
BRAND_COUNTRYCountry ISO code
BRAND_CURRENCYCurrency code
BRAND_TIMEZONETimezone

Additional variables (integrations, feature flags, etc.) are configured per brand as needed.

Build

pnpm build

This generates the production build in the build/ directory.

Deploy process

Deploy is managed via GitHub Actions. Your fork has a deploy.yml workflow that triggers automatically on push to main, or can be triggered manually.

Automatic deploy

Push to main → build → deploy to production.

Manual deploy

Go to ActionsDeployRun workflow:

  • Choose the target environment (production, staging, etc.)
  • Optionally specify a ref (branch, tag, or commit SHA) for a one-time deploy

What happens behind the scenes

  1. Your deploy.yml calls the centralized deploy workflow in front-ops
  2. The workflow validates your repository and environment
  3. Builds your project
  4. Deploys to the correct Cloudflare Worker

You don't need to configure Cloudflare tokens or worker names — this is managed by the Cactus team.

Environments

Each brand can have multiple environments (production, staging, homolog, etc.). Each environment is a separate Cloudflare Worker with its own domain and configuration.

The Cactus team defines which environments are available for your brand. Contact the team to request new environments.