Deployment Guide

Comprehensive guide to deploying Refresh App Web across environments.

Environments

Environment
URL
AWS Account
Cloudflare Worker
Auto-Deploy

PR Sandbox

[pr-num].dev.app.refresh.tech

469718319213

app-web-dev-sandbox

On PR creation

Development

dev.app.refresh.tech

469718319213

app-web-development

On merge to main

Staging

staging.app.refresh.tech

328237344502

app-web-staging

After dev deployment

Production

app.refresh.tech

231307122957

app-web-production

After staging deployment

Deployment Pipeline

PR Created → PR Sandbox Deploy

PR Merged to main → Dev Deploy → Staging Deploy → Production Deploy

CI/CD Workflow

GitHub Actions workflows automate deployments. See Architecture: Cloudflare Deployment for pipeline details.

Manual Deployment

Prerequisites

  1. Wrangler CLI installed:

  1. Authenticated to Cloudflare:

  1. AWS credentials configured:

Deploy to Development

Deploy to Production

Database Migrations

Migrations apply to read replicas first, then write region. See Architecture: Database Architecture.

Rollback Procedure

Rollback Deployment

Rollback Database Migration

  1. Create down migration:

  1. Apply manually:

Monitoring Deployments

  1. Check Cloudflare Dashboard:

    • Workers & Pages → app-web-production

    • View deployment status

  2. Check GitHub Actions:

    • Actions tab → Recent workflow runs

    • View logs for errors

  3. Check application:

    • Visit deployment URL

    • Verify functionality

Troubleshooting

Deployment Failed

  1. Check GitHub Actions logs

  2. Verify AWS SSM parameters exist

  3. Check Cloudflare API token permissions

  4. Review build errors in logs

Migration Failed

  1. Check database connectivity

  2. Verify migration SQL syntax

  3. Review RLS policies

  4. Check role permissions


Last updated: October 2025

Last updated