This is an action to create a deployment. It is designed to work with an external deployment system.
To create a deployment:
jobs:
build:
steps:
- uses: actions/checkout@v2
- uses: int128/deployment-action@v1
This action infers the environment name as follows:
- On a pull request, the environment name is generated from the number like
pr-123
- On push of a branch, the environment name is the branch name like
main
- On push of a tag, the environment name is the tag name like
tags/v1.0.0
- Otherwise, the environment name is pair of workflow name and event name, like
workflow/schedule
You can explicitly set the environment name by the input.
This action deletes all deployments of the environment name before creation. It keeps the timeline of pull request clean.
Name | Default | Description |
---|---|---|
environment |
(inferred from event) | Environment name |
environment-suffix |
|
Suffix of environment name |
token |
github.token |
GitHub token |
Name | Description |
---|---|
url |
Deployment URL |
id |
Deployment ID (for REST) |
node-id |
Deployment ID (for GraphQL) |