-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (35 loc) · 948 Bytes
/
nginx.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
on:
push:
paths:
- 'html/**'
branches:
- main
- master
name: Deploy nginx
jobs:
deploy:
name: Deploy to cluster
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: master
- name: Deploy to cluster
uses: gnuu-de/kubectl@master
env:
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
with:
args: rollout restart deployment/nginx
- name: Verify deployment
uses: gnuu-de/kubectl@master
env:
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
with:
args: get pods -l app=nginx
- name: Announce deployment
uses: wei/curl@v1
env:
MATRIX_KEY: ${{ secrets.MATRIX_KEY }}
MATRIX_ROOM: ${{ secrets.MATRIX_ROOM }}
with:
args: -d '{\"text\":\"New deployment nginx done\", \"key\":\"'${MATRIX_KEY}'\", \"room\":\"'${MATRIX_ROOM}'\"}' https://api.gnuu.de/matrixbot/