agentleFS
OpenxIntelligenceOpenxIntelligence/Coding-Agent-Skills/deploy-it/SKILL.md

deploy-it

Skill4 starsChanged 25 days agoMITView on GitHub

Deployment patterns for Vercel, Netlify, Replit, Firebase Hosting, Railway, Render, and Cloudflare. Use when user wants to deploy, publish, go live, host a website, or mentions these platforms. Also use when troubleshooting deployment issues like "works locally but not deployed" or environment variable problems.

  • Installs packages
  • Commits and pushes

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Update DNS at your registrar

    line 43
  2. Very specific:

    Make sure npm run build works locally first

    line 191
  3. Distinctive:

    Check the build logs on the platform

    line 192
  4. Distinctive:

    SPA routing issue: Add redirect rules:

    line 196
  5. Distinctive:

    Check build logs (platform dashboard)

    line 217
  6. Very specific:

    Run npm run build locally to see the error

    line 218
  7. Distinctive:

    Check if deployment actually completed

    line 229
  8. Distinctive:

    Add CORS headers to your API

    line 234

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Deploy It

Get your app live without the headache.

Quick Comparison

PlatformBest ForFree TierDeploy Command
VercelNext.js, ReactGenerousnpx vercel
NetlifyStatic sites, JAMstackGenerousnpx netlify deploy --prod
RailwayFull-stack, databases$5/month creditrailway up
RenderAPIs, Docker, databasesLimitedGit push
Cloudflare PagesStatic, edge functionsVery generousGit push
FirebaseFirebase projectsLimitedfirebase deploy
ReplitQuick prototypesLimitedClick Deploy

Vercel (Best for Next.js)

First Time Setup

npm i -g vercel
vercel login
vercel

Deploy Updates

vercel --prod

Environment Variables

  1. Go to vercel.com → Your project → Settings → Environment Variables
  2. Add your variables
  3. Redeploy (important!)

Custom Domain

  1. Settings → Domains → Add
  2. Update DNS at your registrar

vercel.json (optional config)

{
  "rewrites": [{ "source": "/(.*)", "destination": "/" }],
  "headers": [
    {
      "source": "/api/(.*)",
      "headers": [{ "key": "Cache-Control", "value": "no-store" }]
    }
  ]
}

Netlify

First Time Setup

npm i -g netlify-cli
netlify login
netlify init

Deploy

netlify deploy --prod

Build Settings (netlify.toml)

[build]
  command = "npm run build"
  publish = "dist"  # or "build" or ".next" or "out"

[[redirects]]
  from = "/*"
  to = "/index.html"
  status = 200

Environment Variables

Site Settings → Build & deploy → Environment

Railway (Full-Stack + Databases)

First Time Setup

npm i -g @railway/cli
railway login
railway init

Deploy

railway up

Add Database

  1. Dashboard → New → Database (Postgres, MySQL, Redis, MongoDB)
  2. Variables are auto-added to your app

Environment Variables

Dashboard → Variables → Add

Render

Deploy via GitHub

  1. Connect GitHub repo
  2. Choose Web Service or Static Site
  3. Set build command: npm run build
  4. Set start command: npm start

Environment Variables

Dashboard → Environment → Add

render.yaml (optional)

services:
  - type: web
    name: my-app
    env: node
    buildCommand: npm install && npm run build
    startCommand: npm start

Cloudflare Pages (Fast + Free)

Deploy via GitHub

  1. Connect GitHub repo
  2. Set build command: npm run build
  3. Set output directory: dist or build or out

Environment Variables

Settings → Environment variables

_redirects (for SPA)

/*    /index.html   200

Firebase Hosting

Setup

npm i -g firebase-tools
firebase login
firebase init hosting

Deploy

npm run build
firebase deploy --only hosting

firebase.json (SPA config)

{
  "hosting": {
    "public": "dist",
    "ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
    "rewrites": [
      { "source": "**", "destination": "/index.html" }
    ]
  }
}

Replit

  1. Hit the Deploy button in your Replit
  2. Choose deployment type (Static/Web Service)
  3. Done

Keeping it Running

For backends, you may need Replit's paid tier to keep it always-on.

Common Deployment Problems

"Works locally, broken on deploy"

Check environment variables:

  • They must be set in the platform's dashboard
  • Next.js: NEXT_PUBLIC_ prefix for client-side vars
  • Redeploy after adding env vars

Check build output:

  • Make sure npm run build works locally first
  • Check the build logs on the platform

"404 on page refresh"

SPA routing issue. Add redirect rules:

Vercel (vercel.json):

{ "rewrites": [{ "source": "/(.*)", "destination": "/" }] }

Netlify (_redirects in public folder):

/*    /index.html   200

"API routes not working"

  • Vercel: API routes work automatically for Next.js
  • Netlify: Need Netlify Functions (different syntax)
  • Cloudflare: Need Workers or Pages Functions
  • Others: Need separate backend deployment

"Build failed"

  1. Check build logs (platform dashboard)
  2. Run npm run build locally to see the error
  3. Common issues:
    • Missing dependencies (add to package.json)
    • TypeScript errors
    • Missing env vars (undefined at build time)
    • Case sensitivity (Linux servers are case-sensitive)

"Site shows old version"

  • Clear CDN cache (usually in dashboard)
  • Hard refresh browser: Cmd+Shift+R
  • Check if deployment actually completed

"CORS errors"

  • Backend and frontend on different domains
  • Add CORS headers to your API
  • Or use same-origin deployment

Pre-Deploy Checklist

  • npm run build works locally
  • All environment variables documented
  • API keys NOT in code (use env vars)
  • console.log statements cleaned up
  • Error handling in place
  • Loading states for async operations
  • Mobile responsive

Which Platform?

Use Vercel if: Next.js project, want easiest experience

Use Netlify if: Static site, JAMstack, want forms/functions

Use Railway if: Need a database, full-stack app

Use Render if: Need Docker, cron jobs, background workers

Use Cloudflare if: Want speed, generous free tier, edge functions

Use Firebase if: Already using Firebase backend

Use Replit if: Quick prototype, want to share link fast

Environment Variable Cheat Sheet

FrameworkClient-side prefixServer-side
Next.jsNEXT_PUBLIC_No prefix
ViteVITE_No prefix
Create React AppREACT_APP_N/A
SvelteKitPUBLIC_No prefix

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.