SEO Deploy Automator 🚀
Objetivo
Standardize the deployment workflow when SEO content (Blog Posts, Metadata, Slugs) is modified. Since sitemap.xml is generated at build time, we must ensure a clean build before pushing changes to GitHub.
Guidelines
- •Target File:
c:\Users\diego\Diktalo\utils\blogData.ts - •Output File:
c:\Users\diego\Diktalo\public\sitemap.xml - •Crucial Step:
npm run buildmust run successfully. This script runsnode scripts/generate-sitemap.jsinternally.
Workflow
1. Verification (Before Push)
If you have modified blogData.ts or any routing logic:
- •Run
npm run build. - •Check that the output says
✅ Added X blog posts to sitemap. - •Verify
public/sitemap.xmlhas updated timestamps (lastmod) or new slugs.
2. Deployment (GitHub Sync)
Once the build passes:
- •
git add utils/blogData.ts public/sitemap.xml - •
git commit -m "chore(seo): update blog content and regenerate sitemap" - •
git push origin main
Troubleshooting
- •If
npm run buildfails, DO NOT PUSH. Fix the syntax error first (usually inblogData.ts). - •If
sitemap.xmlis empty, check the regex parsing inscripts/generate-sitemap.js.