Resource behavior
Public-image web servers do not support GitHub previews. Use the returned endpoint rather than constructing a hostname. Branch previews can redeploy on subsequent branch pushes. A preview is not automatically deleted when a pull request is merged or closed; delete it explicitly.
Review dependencies before creation
Compute previews copy parent compute and container settings. Static previews copy build and output settings. Ifpreview.variables is omitted, Spring Winter copies the parent’s environment set for that resource: Runtime for compute, Build for static websites. An explicit empty array starts with no editable variables. An explicit list supplies the complete initial override.
Separate compute does not create a separate database, cache, queue, bucket, credential or external service. Before creation, choose preview-specific dependencies and variable values. A preview worker using a production queue can consume production jobs. A preview application using a production database can change production data. Do not create the preview first and rely on changing these values later.
Create a preview
Use the appropriate parent endpoint:Content-Type: application/json. This example deliberately avoids inheriting environment variables:
variables with the complete preview-specific set if required. For a commit preview, set source to commit and supply git_sha instead of branch. Read the web server, worker or static website contract before the request.
The response includes resource, preview and workflow_run_id. HTTP 201 means accepted, not deployed. Follow the exact returned workflow as described in the agent guide. Check the deployed application where it has a public URL. A running worker needs job-level checks instead.
Inspect and remove previews
The same parent pattern applies to each resource type:web_servers with workers or static_websites as applicable. Deletion is asynchronous. Wait for its workflow to finish; do not assume that an accepted request has removed the infrastructure. Delete previews before deleting their parent. GitHub branches are not deleted.
Preview environment and observability
Use the preview’s/environment endpoint to inspect or replace its environment set. For compute Runtime values: