-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (41 loc) · 1.18 KB
/
deploy.yaml
File metadata and controls
45 lines (41 loc) · 1.18 KB
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
41
42
43
44
45
name: deploy
on:
deployment
permissions:
contents: read
deployments: write
jobs:
deploy:
name: deploy
runs-on: ubuntu-latest
env:
SHA: ${{ github.event.deployment.sha }}
ENVIRONMENT: ${{ github.event.deployment.environment }}
DEPLOY_ID: ${{ github.event.deployment.id}}
steps:
- name: In-progress Status
uses: chrnorm/deployment-status@v2
with:
token: '${{ github.token }}'
state: 'in_progress'
deployment-id: ${{env.DEPLOY_ID}}
- name: "Checkout"
uses: "actions/checkout@v3"
- name: "Deploy ${{env.ENVIRONMENT}}"
run: |
echo "Deploying ${SHA} to ${ENVIRONMENT} environment"
# Perform deploy (whatever that means to you) here
- name: Success Status
if: success()
uses: chrnorm/deployment-status@v2
with:
token: '${{ github.token }}'
state: 'success'
deployment-id: ${{env.DEPLOY_ID}}
- name: Failure Status
if: failure()
uses: chrnorm/deployment-status@v2
with:
token: '${{ github.token }}'
state: 'failure'
deployment-id: ${{env.DEPLOY_ID}}