Skip to content

Commit 3aa5f66

Browse files
committed
add deployment-payload docs
1 parent 2687383 commit 3aa5f66

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

docs/deployment-payload.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Deployment Payloads
2+
3+
The deployment payload is a JSON data structure that gets uploaded to GitHub when a new deployment is created. The values in this payload can be almost anything you want. The branch-deploy GitHub Action hydrates the deployment payload with some useful information that can be accessed later on in the deployment process if you need it.
4+
5+
Here is the data that the branch-deploy Action will add to the deployment payload:
6+
7+
```json
8+
{
9+
"params": "<string>",
10+
"parsed_params": "<object>",
11+
"sha": "<string>",
12+
"type": "branch-deploy"
13+
}
14+
```
15+
16+
- `params` - This is the raw string of parameters that were passed to the branch-deploy Action. You can read more about parameters [here](./parameters.md).
17+
- `parsed_params` - This is the parsed version of the `params` string. This is a JSON object that is created by parsing the `params` string. You can read more about parameters [here](./parameters.md).
18+
- `sha` - This is the commit SHA that is being deployed.
19+
- `type` - This is the type of deployment that is being created. This will always be `branch-deploy` for the branch-deploy Action.

docs/parameters.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,7 @@ The `params` and `parsed_params` outputs can be accessed just like any other out
7575
echo "params: ${{ steps.branch-deploy.outputs.params }}"
7676
echo "parsed_params: ${{ steps.branch-deploy.outputs.parsed_params }}"
7777
```
78+
79+
## Parameters and Deployment Payloads
80+
81+
All parameters (both parsed and raw) can be found in the `payload` of the actual deployment that gets created and stored on GitHub. You can read more about the deployment payload and its structure [here](./deployment-payload.md).

0 commit comments

Comments
 (0)