{
  "id": 14902118,
  "title": "Add a Link Preview Smoke Test to Your Deploy Pipeline (Node Script + GitHub Actions)",
  "url": "https://urgent.news/2026/10/16/add-a-link-preview-smoke-test-to-your-deploy-pipeline-node-script",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-16T07:54:21.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/abidali671/add-a-link-preview-smoke-test-to-your-deploy-pipeline-node-script-github-actions-bea"
  },
  "original_language": "en",
  "account": "In the article, the author discusses the importance of testing link previews after deploying a site. They explain that link previews can break silently, with no error page or failed request in logs. The first sign of a problem is usually a screenshot from someone outside the team. The author created a small, dependency-free Node script to check the Open Graph and Twitter Card tags on a list of production URLs. This script, along with a GitHub Actions job, is run after each deploy.\n\nThe author suggests asserting a few key points:\n1. You don't need to test everything in the head.\n2. Common failures include missing or duplicate meta tags, incorrect image URLs, and wrong URLs.\n3. Social crawlers don't execute JavaScript, so a plain fetch test is closer to reality than a headless browser.\n\nThe provided script, named scripts/check-previews.mjs, uses Node 18+'s built-in fetch function and can be saved with no additional installation required. It checks for missing or duplicate meta tags, image URLs, and the Twitter card attribute. The script uses a list of production URLs and a User-Agent string for the fetch requests.",
  "summary": "We test our APIs, our components, and sometimes our CSS. Then a release goes out, marketing drops the new page into a Slack channel and a LinkedIn post, and the card shows last month's image with a title that ends in \"| Home\". Link previews break silently. No error page, no failed request in your logs, nothing in Sentry. The first signal is usually a screenshot from someone outside the team. So I…",
  "key_points": [
    "Node script checks Open Graph and Twitter Card tags on production URLs",
    "GitHub Actions job runs after each deploy to test link previews",
    "Script asserts missing/duplicate meta tags, incorrect image URLs, and wrong URLs"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}