Skip to content

Deployment

_david edited this page Aug 21, 2026 · 1 revision

Deployment

Pipeline

Two GitHub Actions workflows, both triggered on push to main (and PRs into main for the CI one):

  • Node.js CI (.github/workflows/node.js.yml) — npm ci + npm run build --if-present on Node 20.x and 22.x. Pure build verification, no test run in CI (tests are run manually/locally before merging).
  • Build & Deploy to Render (.github/workflows/deploy.yml) — npm install, npm run build, then curls Render's deploy hook URL (RENDER_SRV/RENDER_KEY secrets).

Important: the deploy workflow's "success" only means the deploy hook was triggered (HTTP 2xx from Render's API) — it does not wait for or reflect the result of Render's own build. Render pulls the repo and does its own independent npm install/build after being triggered; that can fail even when the GitHub Actions run shows green. Always verify a deploy by hitting the live URL directly, not by trusting the Actions status alone.

Live URL: https://nodejs-resume-api-ts.onrender.com

Branching model

  • main — production, deploys automatically on push.
  • develop — integration branch.
  • Feature/fix branches → PR into develop → PR develop into main. See Contributing.

main and develop should always be content-identical after a release cycle completes (git diff origin/main origin/develop empty), even though their commit histories diverge (different squash-merge SHAs per PR) — that divergence is expected and not a problem by itself.

Known deploy gotcha: Puppeteer Chrome download cache corruption

The app depends on the full puppeteer package (not puppeteer-core), which downloads a Chrome binary during npm install. Render persists a build cache (/opt/render/.cache/puppeteer/...) across deploys to speed this up. If a previous build was interrupted mid-download, the cache can end up in a state where the destination folder exists but the actual executable inside is missing — Puppeteer's installer sees the folder, assumes it's already installed, and fails instead of re-downloading:

Error: The browser folder (.../chrome-linux64) exists but the executable (.../chrome) is missing

Fix: on Render's dashboard, use Manual Deploy → "Clear build cache & deploy". This has happened at least once (2026-08-21) and self-resolved on a subsequent deploy without intervention, but don't assume that will always happen — clear the cache if a deploy fails with this error.

Environment variables on Render

Render's environment variables are configured in its dashboard, separately from this repo's .env.example/.env.development/.env.production files. See Getting Started for the full variable list — Render needs the same set.

⚠️ If you're developing locally and your .env's MONGO_URI/MONGOBD_USER happens to point at the same database Render uses, your "local" testing is not isolated — double-check which database you're actually pointed at before running destructive tests or scripts (e.g. migrate:localize-text) against it.

Clone this wiki locally