deploy-site

Executes the full Next.js static site deployment pipeline including data sync, build, and sitemap generation.

1|Updated Feb 1, 2025
One-click install
npx skills add https://github.com/TiagoDanin/TiagoDanin.github.io --skill deploy-site-tiagodanin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: deploy-site
Source: https://github.com/TiagoDanin/TiagoDanin.github.io/tree/main/.claude/skills/deploy-site
Command: npx skills add https://github.com/TiagoDanin/TiagoDanin.github.io --skill deploy-site-tiagodanin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Deploying a Next.js static site involves multiple ordered steps—fetching GitHub and NPM data, generating RSS feeds, building, and creating sitemaps—and running them incorrectly (like the double-build caused by the yarn deploy hooks) wastes time and risks broken output. ## Core Features & Use Cases - Optimized Build Pipeline: Runs data synchronization and build in the correct order, avoiding the redundant double-build caused by prebuild/postbuild hooks. - Pre-Deployment Validation: Checks JSON data integrity, duplicate slugs, build success, and output size before deploying. - Error Handling & Rollback: Provides fallback to cached data when API syncs fail and documents a git-based rollback process. - Use Case: Before pushing a new blog post live, run the pipeline to sync project data, build the static export to dist/, verify RSS feeds and sitemaps, and deploy to GitHub Pages. ## Quick Start Ask the AI to run the full deployment pipeline for the website and verify the build output in the dist directory.

Frequently Asked Questions about deploy-site

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deploy a Next.js static site to GitHub Pages?

Build the static export with yarn build, which outputs to the dist directory, then publish dist to GitHub Pages using a gh-pages branch or a GitHub Actions workflow. Sync external data first so the build includes current content.

Why does yarn deploy run the Next.js build twice?

The deploy script triggers build twice because prebuild and postbuild hooks already run data:rss and sitemap around the main build, and then deploy invokes build again. Run yarn data:github, yarn data:npm, and yarn build directly to avoid the duplicate build.

What happens if the GitHub API rate limit is exceeded during build?

The data sync step fails, but the build continues using the cached github.json data from the previous fetch. You can wait for the rate limit window to reset or proceed with cached data.

How do I verify a static site build before deploying?

Check that the dist directory exists, count generated HTML pages, confirm RSS feeds in public/rss and sitemaps in public, and review the total output size for unexpected growth. Running yarn start locally lets you test the build at localhost.

How do I roll back a broken GitHub Pages deployment?

Revert the faulty commit with git revert HEAD or restore the previous dist output with git checkout from an earlier commit, then rebuild and redeploy. This restores the last known working version of the site.