Skip to content

Commit cfc98b3

Browse files
committed
Explain what the GH action does
1 parent 9af06d0 commit cfc98b3

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

docs/deployment/preview-branches.mdx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,18 @@ For full details see our [pricing page](https://trigger.dev/pricing).
4141

4242
## Using preview branches using GitHub Actions (recommended)
4343

44-
This GitHub Action
44+
This GitHub Action will:
45+
46+
1. Automatically create a preview branch for your Pull Request (if the branch doesn't already exist).
47+
2. Deploy the preview branch.
48+
3. Archive the preview branch when the Pull Request is merged/closed.
4549

4650
```yml .github/workflows/trigger-preview-branches.yml
4751
name: Deploy to Trigger.dev (preview branches)
4852

4953
on:
5054
pull_request:
51-
types: [opened, synchronize, reopened, closed, merged]
55+
types: [opened, synchronize, reopened, closed]
5256

5357
jobs:
5458
deploy-preview:
@@ -70,12 +74,14 @@ jobs:
7074
TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }}
7175
```
7276
73-
For this workflow to work, you need to set up the following secrets in your GitHub repository:
77+
For this workflow to work, you need to set the following secrets in your GitHub repository:
7478
75-
- `TRIGGER_ACCESS_TOKEN`: Your Trigger.dev personal access token. View the instructions [here](/github-actions) to learn more.
79+
- `TRIGGER_ACCESS_TOKEN`: Your Trigger.dev personal access token. View the instructions [here](/github-actions) to learn how.
7680

7781
Notice that the deploy command has `--env preview` at the end. We automatically detect the preview branch from the GitHub actions env var.
7882

83+
You can manually specify the branch using `--branch <branch-name>` in the deploy command, but this isn't required.
84+
7985
## Manually creating, deploying and archiving preview branches
8086

8187
### Creating and archiving preview branches from the dashboard

0 commit comments

Comments
 (0)