Skip to content

Commit

Permalink
Merge pull request #1 from devserkan/health-check-workflow
Browse files Browse the repository at this point in the history
add healthcheck workflow
  • Loading branch information
devserkan authored Sep 17, 2024
2 parents 9ec6be7 + 8145be8 commit 19a0be4
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/healthCheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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://redux-anecdotes-ci.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: redux-anecdotes-ci 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: redux-anecdotes-ci is unhealthy!
webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
username: 'devserkan'
colour: '#d73a49'

0 comments on commit 19a0be4

Please sign in to comment.