Guides
Preview Deployments
Automatic preview environments for every pull request
Every pull request can get its own live environment with a unique URL, so you can test changes before merging.
How It Works
- You open a pull request on GitHub
- Rock8Cloud builds and deploys a preview environment
- A preview URL is available (e.g.,
https://your-service-pr123.apps.rock8.cloud) - Push more commits → the preview updates automatically
- Close or merge the PR → the preview is cleaned up
Configuration
The Preview Deployments workflow is enabled by default. To adjust:
- Open the service Workflows tab
- Find the Preview Deployments workflow
- Configure source branch patterns (defaults to
feat/*) - Configure target branch if needed (defaults to the service's default branch)
See Workflows for the full configuration reference.
Environment Variables
Preview deployments use the same environment variables as your stable deployment. If you need isolated databases or API keys for previews, create a separate project.
Cleanup
Previews are automatically removed when the pull request is closed or merged. No manual cleanup needed.
Troubleshooting
| Problem | Solution |
|---|---|
| No preview created | Check the workflow is enabled and branch patterns match |
| Preview not updating | Verify new commits triggered a synchronize event |
| Preview not removed | Check the cleanup job status in the Jobs tab |