Skip to main content
Deploys a Truss model or Chain to Baseten, waits for the deployment to become active, optionally validates it with a predict request, and cleans up the deployment. For workflow examples, see CI/CD. Models are detected when truss-directory points to a directory containing config.yaml. Chains are detected when truss-directory points to a .py file containing a @chains.mark_entrypoint class. Pin to a specific release tag. Don’t use @main because the action API may change between releases.

Inputs

string
required
Path to a model directory containing config.yaml, or a .py file for Chain deployments.
string
required
Baseten API key. Store this as an encrypted secret. Never hardcode it in your workflow file.
string
default:""
Override the model or Chain name. For models, maps to truss push --model-name. For Chains, sets the chain_name. If empty, the action uses model_name from config.yaml for models. For Chains, it uses the configured Chain name, then falls back to the entrypoint class name.
string
default:""
For models, publish to a specific environment. This input implies publish. For Chains in v0.1.2, this input doesn’t promote the deployment. See regional-environment for Chain validation behavior. If empty, the action doesn’t select an environment.
string
default:"false"
Set to true when environment names a regional environment. The action sends validation requests to the regional endpoint. For Chains in v0.1.2, that endpoint calls the deployment already serving the environment, not the new deployment created by the action. Leave this input set to false to validate the new Chain deployment through its deployment-specific endpoint. Requires environment.
string
default:"true"
Models only. Attach git versioning info (SHA, branch, tag) to the deployment.
string
default:""
Models only. JSON string of labels as key-value pairs, for example {"team": "ml", "project": "llm"}. Attach metadata to track deployments in your CI pipeline.
string
default:""
Models only. Name of the deployment. If empty, defaults to PR-{number}_{sha} on pull requests or {sha} on direct pushes.
string
default:""
Models only. Baseten team name. Set this input when the API key can access multiple teams and the action can’t select one interactively.
string
default:"true"
Deactivate the newly created deployment at the end of the run. Useful for PR checks where you deploy, validate with a predict request, and tear down. Set to false when you want the deployment to remain active for manual inspection or when a model workflow deploys to an environment.The activate and deactivate calls this action makes are rate limited to 20 requests/minute per API key. See management API rate limits if you run high-volume CI.
string
default:""
JSON override for the predict request payload. For models, if empty, the action reads model_metadata.example_model_input from config.yaml. For Chains, provide the payload explicitly. The action skips prediction when the resolved JSON value is missing, null, false, 0, an empty string (""), an empty object ({}), or an empty array ([]).
string
default:"45"
Maximum minutes to wait for the deployment to become active. The default (45 minutes) accommodates large model builds like TRT-LLM. Reduce this for smaller models to fail faster.
string
default:"300"
Timeout in seconds for the predict request.

Outputs

string
Baseten deployment ID. Use this to reference the deployment in downstream steps or API calls.
string
Baseten model ID. Set for model deployments only.
string
Baseten Chain ID. Set for Chain deployments only.
string
For Chains, the configured Chain name. For models in v0.1.2, this output is model_name from config.yaml, even when the model-name input overrides the deployed model name.
string
Seconds spent waiting for the deployment to become active after the push call returns. This output doesn’t include time spent inside the push call, so it isn’t the total deployment or build duration.
string
Response body from the predict call, truncated to 4 KB.
string
Final status of the action run. One of: success, deploy_failed, deploy_timeout, predict_failed, cleanup_failed.

Status codes

Deployment naming

For models, the action generates deployment names from Git context unless you override with deployment-name:
  • Pull requests: PR-{number}_{short_sha} (for example, PR-42_abc1234).
  • Direct pushes: {short_sha} (for example, abc1234).

Permissions

The action requires only contents: read permission. No additional GitHub token permissions are needed.