Monitor Website Uptime using GitHub Actions

How to Monitor any website uptime using GitHub Actions for free

Create your own website monitor in seconds!

Step 1

Create a new repository, I’ll name it piyushmehta.com

Step 2

Create a directory named and workflows inside it .github/workflows

Step 3

Create a file with any name, I’ll name is uptime-monitor.yml

Step 4

Write the following in uptime-monitor.yaml

yml
1name: Uptime Monitor
2
3on:
4 schedule:
5 # Run every hour, You can choose your custom time
6 - cron: '*/60 * * * *'
7
8jobs:
9 ping_site:
10 runs-on: ubuntu-latest
11 name: Uptime Check
12 steps:
13 - name: Ping Site
14 uses: srt32/uptime@v0.2
15 with:
16 url-to-hit: 'https://piyushmehta.com/' # Website whose uptime you want to track
17 expected-statuses: '200'

Whenever your website is down, you’ll get a notification from GitHub.

Fin!

Tags:

How to

github

github actions

web dev

Share article
Piyush Mehta © 2023