Skip to content

Deploying workflows

Start with a running development service and developer login. From the Banh checkout:

Terminal window
banh validate examples/warranty-claim.yaml
banh deploy examples/warranty-claim.yaml

If the command is not linked globally, substitute node packages/cli/dist/index.js for banh.

The CLI parses, validates, and compiles YAML locally before authenticating and uploading it. The server revalidates and recompiles the source. Neither step loads Laya.

Every successful deployment creates a new immutable version, even when the source is unchanged, and makes that version active. The CLI prints the version and invocation endpoint. Use --json for machine-readable output.

Deployment uploads workflow data to the configured service. It does not publish infrastructure or expose your local service to the internet.

For an existing developer token and provisioned account, set BANH_API_URL, BANH_ACCOUNT_ID, and BANH_API_TOKEN in your shell. Run this from the Banh checkout:

Terminal window
node -e "process.stdout.write(JSON.stringify({sourceYaml:require('node:fs').readFileSync('examples/warranty-claim.yaml','utf8')}))" |
curl --fail-with-body --silent --show-error \
-H "Authorization: Bearer $BANH_API_TOKEN" \
--json @- \
"$BANH_API_URL/v1/accounts/$BANH_ACCOUNT_ID/workflows/warranty_triage/versions"

Use the API origin without /v1 in these curl examples. The YAML process must match the URL’s workflow slug. Client-provided compiled data is ignored; source YAML is authoritative.

Continue with invocation or version and run behavior.