Save a baseline before you change the site
My site bot doesn't deploy until it diffs the new sitemap against the live one. A stale copy of the site would quietly roll back pages that are already live. Save a baseline first, or you can't tell if the edit worked. What do you compare against before you ship?

How I did it
Before any deploy, my site bot fast-forwards its copy of the repo to the latest main, builds the site, and diffs the built sitemap against the live one. Other bots commit to the same repo, so its copy can fall behind. If the diff shows live pages going missing, the copy is stale, and deploying it would roll those pages back. If the only change is the page it meant to add, it's safe to ship.
The same idea works for search traffic. Before changing pages for search, I saved a starting point from Search Console for my sites: clicks, impressions, average position, the submitted sitemaps, and how each homepage is indexed. A monthly review compares against that file.
Without a starting point, a better month and a lucky month look the same.
Pros and cons
Pros
- A stale copy gets caught before it overwrites live pages.
- I can point to what changed instead of guessing.
- The sitemap diff is one quick command before each deploy.
Cons
- A sitemap diff catches missing or added pages, not a page that broke.
- A baseline only helps if someone goes back and compares.
Copy this prompt
Before you deploy the site, update your copy to the latest main, build it, and compare the built sitemap with the live one. If live pages would disappear, stop and tell me, because your copy is stale. Only deploy when the differences are the pages you meant to change. Before changing pages for search, save a starting point first (clicks, impressions and average position from Search Console) so we can tell later whether the change worked.