Skip to content

Connect a repo

This page covers everything beyond the basic quickstart: configuring environments, adding custom domains, scoping route detection, and tuning build defaults.

Environments

Every project has two environments out of the box:

  • Preview: used for every non-default-branch build.
  • Production: promoted from a verified preview on merge to the default branch.

You can add as many additional environments as you need (staging, qa, canary, etc.). Each environment has its own set of environment variables and its own preview URL pattern.

Environment variables

Set environment variables under Project settings → Environment.

  • Secrets are encrypted at rest with per-tenant keys.
  • Values are injected at build time only for the environments you scope them to.
  • You can reference shared secrets across environments without duplicating them.

Custom domains

By default, previews live at your-branch.yofix.dev. To use your own domain (e.g. preview.your-company.com):

  1. Go to Project settings → Domains.
  2. Add the domain you want to use.
  3. Add the TXT record we show you for verification.
  4. Add a CNAME pointing to cname.yofix.dev.

We provision a per-host Let’s Encrypt certificate automatically. TLS renewal is automatic.

Build configuration

Most apps work with zero configuration. To override:

  • Install command: default detected from package manager.
  • Build command: default detected from framework and package.json scripts.
  • Output directory: default detected from framework.
  • Node version: default detected from .nvmrc, .node-version, or engines.

Set overrides under Project settings → Build.

Route scoping (advanced)

For monorepos and apps with conditional routes, you can tell YoFix exactly which routes to screenshot. Otherwise we use AI route impact analysis to pick changed routes automatically.

# yofix.yml (optional)
routes:
- path: /
- path: /pricing
- path: /docs/[slug]
params:
slug: ['intro', 'pricing', 'security']

Next