Internal tools for Code the Change at USC.
Use Node.js 24 and pnpm through Corepack.
nvm use
corepack enable
pnpm install --frozen-lockfile
cp .env.example .env.localSet SITE_PASSWORD (12+ characters) and SESSION_SECRET (32+ characters) in .env.local. Generate a session secret with openssl rand -hex 32.
pnpm devpnpm check— formatting, lint, types, and testspnpm format:write— format codepnpm build— production buildpnpm build:cloudflare— Cloudflare Worker build
Pushes to main, including merged PRs, deploy to internal.ctcusc.com after checks pass. The Deploy workflow also supports manual runs.
Same-repo PRs build and deploy to pr-<number>.internal.ctcusc.com independently of CI checks. Find the preview in the PR's deployment status, updated bot comment, or Preview workflow summary. Closing the PR deletes its preview and marks its deployments inactive.
Production and previews share four GitHub Actions secrets: CLOUDFLARE_ACCOUNT_ID, CLOUDFLARE_API_TOKEN, SITE_PASSWORD (12+ characters), and SESSION_SECRET (32+ characters). The first production deployment registers the custom domain for production and previews. Previews use workers.dev until the custom domain is active.