-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (34 loc) · 1.13 KB
/
deploy.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: Deploy
on:
push:
branches:
- production
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Create new deployment
run: |
gh api --method POST \
-H "Accept: application/vnd.github+json" \
/repos/${{ github.repository }}/deployments \
-f "ref=production" \
-f "environment=production"
DEPLOYMENT_ID=$(gh api /repos/ParzivalEugene/michkoff-links/deployments | jq -r '.[0].id')
- name: Create new deployment status
run: |
gh api --method POST \
-H "Accept: application/vnd.github+json" \
/repos/${{ github.repository }}/deployments/${{ env.DEPLOYMENT_ID }}/statuses \
-f "state=pending"
-f "auto_inactive=true"
- name: Fake deployment
run: |
sleep 10
- name: Update deployment status
run: |
gh api --method POST \
-H "Accept: application/vnd.github+json" \
/repos/${{ github.repository }}/deployments/${{ env.DEPLOYMENT_ID }}/statuses \
-f "state=success"
-f "auto_inactive=true"