Monitor your Website Uptime for free[Github Action]

Monitor your Website Uptime for free[Github Action]

Thanks to @upptime/upptime

Prerequisites:

  • A GitHub Account

  • Basic Git Knowledge

  • Coffee Time

  • A fully functioning brain with the ability to read instructions & execute

Steps to follow:

  • Fill in the Repository name, and select "Public" if you want to use a public build time by Github or "Private". Make sure to tick "Include all branches"

  • This will generate a repository on your GitHub account.

  • Click on your profile picture in the upper right corner of the GitHub webpage and then click "Settings"

  • Go to "Settings" > "Developer Settings" > Expand "Personal Access Token"
  • Click "Token(classic)" then "Generate New Token" > "Generate New Token(Classic)"

  • You may need to enter your password to enter the sudo mode.

  • Write a note if you want, select "No expiration" on "expiration", and select "Repo" and "workflow" for scope.

  • Go to your repository then "Settings" > "Secrets and variables" > "Action" > "New Repository Secrets"

  • Write "GH_PAT" as the name and put your secret in the secret tab.

  • Go to the "Pages" tab of your repository then select "gh-pages" "/root" and set up your custom domain if you have one.

  • To connect a custom domain go to your DNS management (cPanel/Cloudflare/GCoreLab/Your Domain provider's Dashboard where you manage your DNS records) and add a CNAME record with your desired name (name.yourdomain.tld) and yourgithubusername.github.io as the target. If you use Cloudflare, you must enable proxy.

  • Go to the code tab of your Github repository and open the .upptimerc.yml file. You can use any git client (Github Desktop/Terminal with git) or the web interface to change the data. Keep in mind that if you don't want to use a custom domain, you must uncomment the line "baseurl: /your_repo_name" and remove "cname: name.yourdomain.tld"

  • Otherwise, leave it as it is in the screenshot.

  • Save and commit to the main branch.

  • Wait a few minutes for the site to build. You can watch the background activity on your repository's "Action" tab.

  • You should now see a website on your domain/Github pages.

  • Thank you! 🫡