forked from OpenTTD/bananas-server
40 lines (34 loc) · 1.23 KB
/
deployment.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Deployment
on:
deployment:
jobs:
deploy_to_aws:
name: Deploy to AWS
runs-on: ubuntu-latest
steps:
- name: Deployment in progress
uses: openttd/actions/deployments-update@v1
with:
github-token: ${{ secrets.DEPLOYMENT_TOKEN }}
state: in_progress
description: "Deployment of ${{ github.event.deployment.payload.version }} to ${{ github.event.deployment.environment }} started"
- name: Deploy on AWS
uses: openttd/actions/deploy-aws@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-region: ${{ secrets.AWS_REGION }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
name: BananasServer
- if: success()
name: Deployment successful
uses: openttd/actions/deployments-update@v1
with:
github-token: ${{ secrets.DEPLOYMENT_TOKEN }}
state: success
description: "Successfully deployed ${{ github.event.deployment.payload.version }} on ${{ github.event.deployment.environment }}"
- if: failure() || cancelled()
name: Deployment failed
uses: openttd/actions/deployments-update@v1
with:
github-token: ${{ secrets.DEPLOYMENT_TOKEN }}
state: failure