forked from fullstack-hy2020/full-stack-open-pokedex
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (32 loc) · 1.01 KB
/
healthCheck.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
name: Health Check
on:
schedule:
- cron: "0 0 * * *"
jobs:
healthCheck:
runs-on: ubuntu-20.04
steps:
- name: Check the deployed service URL
uses: jtalk/url-health-check-action@v4
with:
url: https://full-stack-open-pokedex-long-breeze-7978.fly.dev
max-attempts: 3
retry-delay: 5s
- name: Notify Discord on success
if: ${{ success() }}
uses: stegzilla/discord-notify@v2
with:
title: 'Health Check'
message: Pokedex is healthy!
webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
username: 'devserkan'
colour: '#1f883d'
- name: Notify Discord on failure
if: ${{ failure() }}
uses: stegzilla/discord-notify@v2
with:
title: 'Health Check'
message: Pokedex is unhealthy!
webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
username: 'devserkan'
colour: '#d73a49'