Skip to main content

Set up custom schedule for monitoring, comparison

Monitoring is a great way to keep an eye on your site. If your client / editorial team does some changes that break the site -- you will get notified about those right away.


Diffy allows you to set up monitoring of the production environment on a weekly, daily schedule.


In the meantime, you might want to do something different. For example, to set up weekly monitoring of your staging environment. Or maybe compare staging vs production every week automatically. This could be a great way to regularly check the progress of your development.


Here is how you can accomplish this with Github actions.


GitHub actions allow triggering jobs (workflows) on a regular basis. We created Diffy Cron project to demonstrate how it can be done.


There are few steps you need to do:

  1. Create GitHub repository and commit Diffy's CLI to it.
  2. Add Diffy API key to your secrents so you do not expose it anywhere.
  3. Enable GitHub actions for the repo and configure your job

You are welcome to simply clone the repo so you skip the first step. Alternatively create the fresh repo and commit diffy.phar file from the latest release.


Next you need to generate an API key in Diffy.


Now go to the Settings of your GitHub repository and add a secret called `DIFFY_API_KEY`.

GitHub add secret


One last step is to adjust the `.github/workflows/diffy.yml` file to set your project ID and the schedule you would like to run the job.

GitHub Action Configuration


Now you should be good to go. Go ahead and trigger the workflow manually and see the jobs being kicked out in Diffy.