Deploying workflows
Start with a running development service and developer login. From the Banh checkout:
banh validate examples/warranty-claim.yamlbanh deploy examples/warranty-claim.yamlIf the command is not linked globally, substitute node packages/cli/dist/index.js for banh.
What deployment does
Section titled “What deployment does”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.
Direct HTTP deployment
Section titled “Direct HTTP deployment”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:
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.