-
Notifications
You must be signed in to change notification settings - Fork 1
23 lines (21 loc) · 933 Bytes
/
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
name: Deploy
on:
push:
branches:
- master
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Report deploy on GitHub
run: |
echo DEPLOYMENT_ID=$(echo '{"ref":"master","required_contexts":[]}' | curl -X POST \
-H 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
-H content-type:application/json -H accept:application/vnd.github.ant-man-preview+json \
https://api.github.com/repos/$GITHUB_REPOSITORY/deployments -d @- | jq -r .id) >> $GITHUB_ENV
- name: Update deploy on GitHub
run: |
echo '{"state":"success"}' | curl -X POST \
-H 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
-H content-type:application/json -H accept:application/vnd.github.ant-man-preview+json \
https://api.github.com/repos/$GITHUB_REPOSITORY/deployments/$DEPLOYMENT_ID/statuses -d @- | jq -r