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.
There are few steps you need to do:
- Create GitHub repository and commit Diffy's CLI to it.
- Add Diffy API key to your secrents so you do not expose it anywhere.
- Enable GitHub actions for the repo and configure your job
You are welcome to simply clone the repo https://github.com/DiffyWebsite/diffy-cron 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`.
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.
Now you should be good to go. Go ahead and trigger the workflow manually and see the jobs being kicked out in Diffy.