Deployment
Documentation Site
The docs site (docs.pajamaapp.com) is built with Docusaurus and deployed to Cloudflare Pages.
How it works
- Source: The
docs/directory in the repo, plus**/docs/**/*.mdfiles throughout the project - Build: Docusaurus builds the static site from markdown files
- Deploy: GitHub Actions (
.github/workflows/docs.yml) builds and deploys to Cloudflare Pages on every push tomainthat touches docs files - Hosting: Cloudflare Pages serves the site at
docs.pajamaapp.com - Access control: Cloudflare Access (Zero Trust) gates the site — team members authenticate via One-time PIN sent to their email
DNS
The domain pajamaapp.com uses Cloudflare as its DNS provider (nameservers were migrated from GoDaddy). The domain is still registered with GoDaddy. All DNS changes should be made in the Cloudflare dashboard.
Secrets
The GitHub Actions workflow requires two repository secrets:
CLOUDFLARE_API_TOKEN— API token with Cloudflare Pages Edit permissionCLOUDFLARE_ACCOUNT_ID— Cloudflare account ID
Firebase Environments
Overview
Pajama uses three separate Firebase environments to support different stages of development and deployment. Each environment contains a complete suite of Firebase services.
Environments
1. Local Emulator Suite
- Purpose: Local development and testing
- Type: Firebase Local Emulator Suite
- Description: Runs entirely on your local machine, simulating Firebase services without connecting to the cloud
- Use case: Rapid development, offline work, testing without affecting live data
2. Development Project
- Purpose: Integration testing and staging
- Type: Firebase Project (Development)
- Description: Cloud-based Firebase project for testing features in a production-like environment
- Use case: Testing integrations, sharing work with team members, QA validation
3. Production Project
- Purpose: Live application
- Type: Firebase Project (Production)
- Description: Cloud-based Firebase project serving real users
- Use case: Production application with real user data
Firebase Services
Each environment includes the following Firebase services:
- Cloud Firestore: NoSQL database
- Cloud Storage: File and media storage
- Firebase Hosting: Web app hosting
- Authentication: User login and authorization
Environment Selection
The Pajama app includes a developer setting that allows switching between environments at runtime. This enables:
- Developers to test against local emulators without deploying
- QA teams to validate changes in the development environment
- Production builds to connect to the production project
Configuration
Each environment requires separate configuration:
- Emulator: Local ports configuration
- Development Project: Dev Firebase project credentials
- Production Project: Prod Firebase project credentials