dcsan / dcsan/DEC

Set up CI deploy: Cloudflare secrets + prod config

Open
#5 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

The deploy workflow (.github/workflows/deploy.yml) runs wrangler deploy on every push to main. Before the first deploy works, complete the setup below.

1. Add GitHub Actions secrets

Settings → Secrets and variables → Actions → New repository secret:

  • CLOUDFLARE_API_TOKEN — Cloudflare → My Profile → API Tokens → use the "Edit Cloudflare Workers" template, scoped to this account.
  • CLOUDFLARE_ACCOUNT_ID — from the Cloudflare dashboard URL or Workers overview. (Optional if the token has one account, but safer to set.)

2. Set the Worker runtime secrets in Cloudflare

wrangler deploy ships code + assets but not runtime secrets. Set these once per environment (cd web-dec && wrangler secret put <NAME>, or via the dashboard). They persist across deploys.

  • DATABASE_URL — Neon Postgres connection string
  • OPENROUTER_API_KEY — LLM (router, recommendations, /research, etc.)
  • HONCHO_API_KEY — conversational memory (optional; features degrade without it)
  • BETTER_AUTH_SECRET — generate with openssl rand -base64 32
  • BETTER_AUTH_URL — public origin / OAuth issuer (e.g. the prod host)

3. Apply database migrations to prod

The workflow does not run migrations — deploying code won't create the waitlist / Better Auth tables. Apply the Drizzle migrations against the prod DB once (and after any new migration):

  • cd web-dec && pnpm db:migrate (with prod DATABASE_URL)

Decide whether to automate this as a CI step before deploy, or keep it manual. Automating mutates prod on every push, so gate it carefully.

4. Confirm the trigger branch

  • The workflow deploys on push to main only. Current dev is on dc/v2; nothing deploys until it merges to main. Change the branch in deploy.yml if needed.

Verify

  • Push to main (or run the workflow manually via the Actions tab → Deploy → Run workflow) and confirm a green run + the Worker updates.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read .github/workflows/deploy.yml first to confirm the push trigger and wrangler deploy step. In web-dec, run pnpm db:migrate against the production DATABASE_URL after configuring the listed GitHub Actions and Cloudflare runtime secrets. Done means a main-branch or manually triggered workflow completes successfully and the Worker updates.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, postgresql, typescript
Domain
ci-cd, cloud, databases, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.