Skip to content

Commit de4cc03

Browse files
committed
Update README
1 parent ca61a0c commit de4cc03

File tree

1 file changed

+4
-84
lines changed

1 file changed

+4
-84
lines changed

README.md

Lines changed: 4 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
1-
# Action to manage GitHub deployments
2-
3-
Features:
4-
- create a deployment (and invalidate all previous deployments)
5-
- delete all deployments in specific environment
6-
- delete a deployment by id
1+
# Action to send npm service deployment notifications to Slack
72

83
## Usage
94

10-
### create
11-
125
Inputs:
136

147
| parameter | description
@@ -23,91 +16,17 @@ Inputs:
2316
`slack_token`|optional token of slack integration to post messages with deployment results
2417
`slack_channel`|optional slack channel name (both `slack_token` and `slack_channel` are required to post a message)
2518

26-
Outputs:
27-
28-
|output | description
29-
|- | -
30-
`deployment_id` | The `id` of the created deployment
31-
3219
#### Example usage
3320

3421
```yaml
35-
- name: create a deployment
36-
uses: npm/action-deploy@v2
22+
- name: send deployment complete message to Slack
23+
uses: npm/action-deployment-notifications@v1
3724
with:
38-
type: create
39-
token: ${{github.token}}
40-
logs: https://your-app.com/deployment_logs
4125
environment: staging
4226
environment_url: https://staging.your-app.com
4327
job_status: ${{job.status}} # use this to track success of the deployment in post script
4428
```
4529
46-
### delete-all
47-
48-
Allows deleting all deployments for a specific environment
49-
50-
Inputs:
51-
52-
|parameter | description
53-
|- | -
54-
`token` | **Required** token to authorize calls to GitHub API, can be ${{github.token}} to create a deployment for the same repo
55-
`type` | **Required** type of an action. Should be `delete-all`
56-
`environment` | environment to delete all deployments in
57-
58-
Outputs: none
59-
60-
#### Example usage
61-
62-
```yaml
63-
- name: delete all deployments in staging
64-
uses: npm/action-deploy@v2
65-
with:
66-
type: delete-all
67-
token: ${{github.token}}
68-
environment: staging
69-
```
70-
71-
### delete
72-
73-
Given in one of the previous steps you created a deployment, with `delete` you can delete it by id
74-
75-
Inputs:
76-
77-
|parameter | description
78-
|- | -
79-
`token` | **Required** token to authorize calls to GitHub API, can be ${{github.token}} to create a deployment for the same repo
80-
`type` | **Required** type of an action. Should be `delete`
81-
`deployment_id` | **Required** the `id` of the a deployment to delete
82-
83-
Outputs: none
84-
85-
#### Example usage
86-
87-
```yaml
88-
- name: create a deployment
89-
uses: npm/action-deploy@v2
90-
id: create-deployment
91-
with:
92-
type: create
93-
token: ${{github.token}}
94-
logs: https://your-app.com/deployment_logs
95-
environment: staging
96-
environment_url: https://staging.your-app.com
97-
job_status: ${{job.status}}
98-
99-
# add your deployment steps here
100-
- name: placeholder for actual deployment
101-
run: sleep 10s
102-
103-
- name: delete deployment
104-
uses: npm/action-deploy@v2
105-
with:
106-
type: delete
107-
token: ${{github.token}}
108-
deployment_id: ${{steps.create-deployment.outputs.deployment_id}}
109-
```
110-
11130
## Development
11231
11332
### Prerequisites
@@ -163,6 +82,7 @@ Actions are run from GitHub repos so we will checkin the packed dist folder.
16382

16483
Then run [ncc](https://github.com/zeit/ncc) and push the results:
16584
```bash
85+
$ nvm install
16686
$ npm run pack
16787
$ git add dist
16888
$ git commit -a -m "prod dependencies"

0 commit comments

Comments
 (0)