-
Notifications
You must be signed in to change notification settings - Fork 10
54 lines (47 loc) · 1.55 KB
/
deployment-development.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Deployment workflow to be used for Jira reporting
name: Deploy alpha to Development
on:
push:
branches: ["alpha"]
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
jobs:
deploy-dev:
name: Deploy to Dev environment
# IMPORTANT: the workflow must have write access to deployments, otherwise the action will fail.
permissions:
deployments: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: chrnorm/deployment-action@v2
name: Create GitHub deployment
id: deployment-dev
with:
token: '${{ github.token }}'
environment: development
- name: Update deployment status (success)
if: ${{ success() }}
uses: chrnorm/deployment-status@v2
with:
token: '${{ github.token }}'
state: 'success'
deployment-id: ${{ steps.deployment-dev.outputs.deployment_id }}
- name: Update deployment status (failure)
if: ${{ failure() }}
uses: chrnorm/deployment-status@v2
with:
token: '${{ github.token }}'
state: 'failure'
deployment-id: ${{ steps.deployment-dev.outputs.deployment_id }}
- name: Update deployment status (cancelled)
if: ${{ cancelled() }}
uses: chrnorm/deployment-status@v2
with:
token: '${{ github.token }}'
state: 'cancelled'
deployment-id: ${{ steps.deployment-dev.outputs.deployment_id }}