Skip to Content

deploy

The deploy tool runs check, builds the UI and the backend, updates the schema and puts the UI and the API live at <id>.manh.run together; it is the only call that changes the running app.

deploy

  • Parameters:
    • project.
    • force: deploy even though TypeScript reports type errors or a page fails to render. Syntax, gate and contract errors can’t be overridden.
    • reason (required with force, 5–300 characters): why those type errors don’t break the app. manh.run keeps it on the deploy record.
  • Returns:
    • handover: whether the app is ready to hand over. With failing tests or work left it says NOT READY plus what the agent must do now, before replying to you.
    • tests: the results of the tests run on the test copy (passed, total, the failing ones).
    • the deploy result (schema notes, cron jobs registered, whether check was skipped), the app’s addresses, the Progress section and a next step.
  • When the agent calls it: once the API phase passes check, to test the real API; and when the app is done.

The /directory URL has no force or reason.

What a deploy does

  1. Check. Runs all four layers, types included. Any error returns CHECK_FAILED with the list; the running app stays as it was.
  2. UI. Compiles every .tsx file into static files. Each static route gets its own HTML carrying that page’s export const meta. A compile error returns file:line before anything changes.
  3. Backend. Bundles every backend .ts file into one module. Bundle errors return file:line too.
  4. Schema. Tables from *.table.ts are applied to the app’s own database when the new version starts. Tables and columns are only added, never dropped or retyped.
  5. Go live. The UI and the API switch to the new version together. deploy waits until the new version answers, usually 3–10 seconds; the first deploy takes longer.
  6. Test. Runs the tests in spec/acceptance.json (or, until it exists, smoke tests manh.run makes from your files) on a test copy with its own database, for about 30 seconds. Live data is never touched. See Testing.

A file tree that deployed successfully before skips the check step (the result says gate: "known_good"). That way restore_checkpoint followed by deploy always rolls back, even after check gains new rules.

https://<id>.manh.run/ UI https://<id>.manh.run/api/* API (app/orders/get.ts = GET /api/orders)

Next steps

Last updated