Preview deployments
Build an isolated copy of your app for every pull request, with its own URL, and clean it up when the pull request closes.
Preview deployments are off by default and work for applications connected through GitHub.
Don't enable previews on public repositories. Anyone who opens a pull request can run builds and deployments on your server.
Settings
Open Deployments, switch to Previews and click Configure.
| Setting | What it does | Default |
|---|---|---|
| Wildcard domain | Wildcard domain for preview URLs | Generated sslip.io domain |
| Port | Port the app listens on | 3000 |
| Preview limit | Maximum previews per application | 3 |
| Preview labels | Only pull requests with at least one of these labels get a preview. Empty means all. | Empty |
Custom domain
Enter a wildcard such as *.mydomain.com. wtree Cloud generates preview-${appName}-${uniqueId}.mydomain.com. Point a wildcard DNS record (*) at your server's IP address.
How it works
A preview is created when a pull request is opened against the target branch set in your provider settings. If the target is main, a pull request from feature/new-feature to main builds that feature branch. Pull requests to other branches don't trigger previews.
A preview then:
- Rebuilds on each new commit to the pull request.
- Is removed when the pull request closes or merges.
In Deployments › Previews you can see status, open the preview URL, read build and deployment logs, and edit the domain.
Rebuild without new code
Click Rebuild (hammer icon) next to a preview and confirm. wtree Cloud reuses the existing code and reruns only the build. Use it after you change environment variables or build settings, or to retry a failed build.
Use the preview URL
Services in previews get W3PANEL_DEPLOY_URL. Reference it as ${{W3PANEL_DEPLOY_URL}}. See Environment variables.
