Skip to content

Health Check

Health Check #7

Workflow file for this run

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'