You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/deployment/preview-branches.mdx
+26-8Lines changed: 26 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
title: "Preview branches"
3
-
description: "Create isolated environments for each branch of your code, allowing you to test changes in a dedicated preview environment before merging to production"
3
+
description: "Create isolated environments for each branch of your code, allowing you to test changes before merging to production. You can create preview branches manually or automatically with your git branches."
@@ -9,23 +9,41 @@ import UpgradeToV4Note from "/snippets/upgrade-to-v4-note.mdx";
9
9
10
10
## How does it work?
11
11
12
-
The "Preview" environment is a special environment where you can create "branches". Normally you would automatically create a preview branch that matches your git branch when a Pull Request is opened (and then archive it automatically when the PR is merged/closed).
12
+
The "Preview" environment is a special environment that you can create "branches" from. We recommend you automatically create a preview branch for each git branch when a Pull Request is opened and then archive it automatically when the PR is merged/closed.
13
13
14
14
The process to use preview branches looks like this:
15
15
16
16
1. Create a preview branch
17
17
2. Deploy to the preview branch (1+ times)
18
-
3. Trigger runs using the Preview API key and the branch name
19
-
4. Archive the preview branch
18
+
3. Trigger runs using your Preview API key (`TRIGGER_SECRET_KEY`) and the branch name (`TRIGGER_PREVIEW_BRANCH`).
19
+
4. Archive the preview branch when the branch is done.
20
20
21
21
There are two main ways to do this:
22
22
23
-
1. Automatically: using GitHub Actions (recommended)
24
-
2. Manually: in the dashboard and/or using the CLI
23
+
1. Automatically: using GitHub Actions (recommended).
24
+
2. Manually: in the dashboard and/or using the CLI.
25
25
26
-
##Using preview branches using GitHub Actions
26
+
### Limits on active preview branches
27
27
28
-
```yml
28
+
We restrict the number of active preview branches (per project). You can archive a preview branch at any time (automatically or manually) to unlock another slot.
29
+
30
+
Once archived you can still view the dashboard for the branch but you can't trigger or execute runs (or other write operations).
31
+
32
+
This limit exists because each branch has an independent concurrency limit. For the Cloud product these are the limits:
33
+
34
+
| Plan | Active preview branches |
35
+
| ----- | ----------------------- |
36
+
| Free | 0 |
37
+
| Hobby | 5 |
38
+
| Pro | 20 (then paid for more) |
39
+
40
+
For full details see our [pricing page](https://trigger.dev/pricing).
41
+
42
+
## Using preview branches using GitHub Actions (recommended)
0 commit comments