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, or delete it yourself at any time
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.
Requesting a preview manually
You can request a preview directly from an open pull request. Add a comment using the GitHub App's account name and the service name:
@github-app preview frontendReplace github-app with the account name of the Rock8Cloud GitHub App installed for your repository, and replace frontend with the name of your repo-backed service.
The command uses the pull request's current commit and creates or redeploys that PR's preview environment. It works even when the Preview Deployments workflow is disabled or its branch filters do not match. Only the repository owner, organization members, and repository collaborators can run preview commands.
If the organization has no available pod capacity, the request waits in a parked environment and starts automatically when capacity is available. If the service is sleeping, wake it and the pending preview resumes. Repeating a command for the same pull request commit does not create another deployment.
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.
Deleting a preview manually
You can remove a preview before its pull request is closed, for example to free up capacity:
- Select the preview environment (PR #123 in the service sidebar)
- Open the Overview tab
- Open the actions menu in the header bar and choose Delete environment
The preview stops running and its URL goes away. The pull request itself is untouched, so pushing another commit to it creates the preview again.
Troubleshooting
| Problem | Solution |
|---|---|
| No preview created | Check the workflow is enabled and branch patterns match |
| Preview waiting for pod capacity | It starts automatically when capacity is available |
| Preview waiting because service is sleeping | Wake the service to resume the pending preview |
| Preview not updating | Verify new commits triggered a synchronize event |
| Preview not removed | Delete it manually from Overview → Delete environment |