𝟯 𝗣𝗼𝘀𝘁-𝗗𝗲𝗽𝗹𝗼𝘆 𝗖𝗵𝗲𝗰𝗸𝘀 𝗳𝗼𝗿 𝗖𝗹𝗼𝘂𝗱𝗳𝗹𝗮𝗿𝗲 𝗣𝗮𝗴𝗲𝘀
I spent two weeks debugging production errors. One error was a sitemap rule that blocked my sitemap index. Another was an image upload delay.
I do not use full end-to-end test suites. Instead, I run three specific checks after every Cloudflare Pages build. These checks target the exact failures I face with my Astro 5 SSG sites.
Here is my workflow:
- Sitemap Verification
I check if sitemap-index.xml returns a 200 status code on all my domains. I also check sitemap-0.xml to ensure it contains a minimum number of URLs.
For one of my sites, if the count drops below 1,000, I know my data pipeline failed. I use curl without redirect following to catch mistakes in my _redirects rules. A bad rule might look fine in a browser but block search engine crawlers.
- IndexNow Submission
After the sitemap check passes, I run a script to submit URLs to the IndexNow endpoint. This sends my links to Bing, Yandex, Naver, and Seznam.
If IndexNow returns a 403 error, my key verification file failed to deploy. Catching this immediately prevents delays in search engine indexing. I run this manually after deployment. This ensures I only submit URLs that are live on the CDN.
- Lighthouse Trend Monitoring
I run a scheduled Lighthouse check every Monday. I check the homepage and one deep page per site.
I look for three things:
- Performance scores below 80
- Cumulative Layout Shift above 0.1
- Accessibility regressions
I do not use these scores to block deployments. I use them to monitor trends. If scores drop, I check my Tailwind config or layout components.
Why these three?
I do not monitor uptime because I trust Cloudflare. I do not test API availability because my sites are static. These three checks cover the actual ways my specific setup fails.
Source: https://dev.to/morinaga/three-post-deploy-checks-i-run-after-every-cloudflare-pages-build-35je