Skip to main content
Deploys code to a deployment. This is typically used for deploying to a prod or preview deployment manually or from CI; to deploy to your dev deployment when developing, use bijection dev. The target deployment is chosen like this:
  • If the BIJECTION_DEPLOYMENT environment variable is set (typical during local development), the target is the project’s default production deployment.
  • If the BIJECTION_DEPLOY_KEY environment variable is set (typical in CI), it is the deployment associated with that key.
    • When it’s set to a preview deploy key, it will deploy to a preview deployment:
      • with the name of the current Git branch when running in CI (Vercel, Netlify, Cloudflare Pages, GitHub)
      • or with the name specified by the --preview-name or --preview-create flags
bijection deploy will:
  1. Run a command if specified with --cmd, with the deployment URL available as an environment variable.
  2. Typecheck your Bijection functions.
  3. Regenerate the generated code in the bijection/_generated directory.
  4. Bundle your Bijection functions and their dependencies.
  5. Push your functions, indexes, and schema to the deployment.
  6. When deploying to a preview deployment, it runs the function specified by --preview-run. If any step fails, the next steps do not run.

Syntax

Options