[build]
  publish = "releases"

  [build.environment]
    YARN_FLAGS = "--frozen-lockfile"
    YARN_VERSION = "1.22.4"
    NODE_VERSION = "20"

# Production: just build, don't update releases/ (protected by GitHub Action)
[context.production]
  command = "yarn run build"

# Deploy previews: copy to releases/ so preview works
[context.deploy-preview]
  command = "yarn run build && cp -r build/* releases/"

# Branch deploys: same as previews
[context.branch-deploy]
  command = "yarn run build && cp -r build/* releases/"
