Deliver a static site to Netlify — register the Netlify environment, then run `spectoflow deliver`, which installs and builds the site, runs `netlify deploy --dir <built folder> --no-build --json` as a draft (preview) or `--prod`, and health-checks the deployment URL.
2 stars
0 votes
0 copies
0 views
Added December 4, 2026
ai-agentsrustshellnextjsdockergit
Works with
cli
Security analysis
A92/100
mediumInstalls packages at runtime which could introduce malicious dependencies
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Deploy Netlify?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/georgesmomo-deploy-netlify)
---
name: deploy-netlify
description: Deliver a static site to Netlify — register the Netlify environment, then run `spectoflow deliver`, which installs and builds the site, runs `netlify deploy --dir <built folder> --no-build --json` as a draft (preview) or `--prod`, and health-checks the deployment URL.
capability: operations
inputs: A project that builds to a static folder (dist, build, out…), the Netlify CLI on PATH (or the user signed in), and — from the USER — the Netlify site (name or Project ID, or a folder linked with `netlify link`) and whether this is a production deployment. Any token is theirs and stays in their shell.
outputs: A `netlify` environment in `.spectoflow/config.json` and a delivery result — the deployment URL, healthy, or the failure code with its cause.
standard: Netlify CLI reference (cli.netlify.com/commands/deploy), The Twelve-Factor App
---
# Deploy to Netlify
The site is built here (the project's own `build` script) and the built folder is uploaded. A **draft (preview)** deploy
is the default; **production** only when the user asked for it. Netlify hosts static files: a Next.js server or any SSR
app is not supported (said, not guessed).
## When to use
The Deliver step with a target of `platform` and a Netlify site, or the user says "put it on Netlify". Not for a server
or local Docker (skill `deploy`), not for Vercel, Cloudflare Pages, Render, Coolify or Dokploy (their own skills).
## Method
1. **Check the CLI**: `netlify --version`. If it is missing, tell the user (`npm i -g netlify-cli`) and stop.
2. **The site.** Ask the user for the site name or Project ID (Netlify → Project configuration → General), or have them
link the folder once with `netlify link` (interactive). Do not guess it, never create a site.
3. **The output folder.** Run the project's build to see where it writes (`dist`, `build`, `out`, `_site`, `public`). A
folder that is not one of those: `--dir=<folder>`. An already built folder: `--no-build`. The project root is never
uploaded (`.env`, `.git`). A Next.js app needs `output: 'export'` first.
4. **Register it**: `spectoflow env add <name> --type=netlify [--site=<name-or-id>] [--prod] [--dir=<folder>] [--url=https://<public url> --health=/]`.
`--prod` only on the user's word. The command allows it on this machine.
5. **The login is the user's.** Either they signed in with `netlify login` (Connections tab) or they create a personal access
token (User settings → Applications) and `export NETLIFY_AUTH_TOKEN=…` in the shell that runs spectoflow. Never ask
them to paste it to you, never write it to a file.
6. **Deliver**: `spectoflow deliver --env=<name>` (a policy gate may ask the user first — wait for it). The CLI's JSON gives
the deployment URL; without a configured `url`, that is the address that is health-checked.
7. **On failure, act on the code**: `untrusted-platform` → the user runs `spectoflow env trust <name>`; `netlify-missing`;
`not-linked` → give `--site` or `netlify link`; `platform-auth` → not signed in / token refused; `install-failed` /
`build-failed` → read the output tail, fix, run again; `no-output-dir` / `bad-dir` → name the folder with `--dir`;
`not-static` → the app is not a static site; `deploy-failed`; `deploy-timeout`; `health-failed`.
At most **three** attempts for the same code, then report it blocked with the last output.
## Output contract
```
::spectoflow role=operations kind=summary msg=<delivered to <name> (<preview|production>) at <url>, healthy — or the code and the cause>
```
A delivery that did not end healthy is never reported as done: end with `REJECTED: <code> — <one-line cause>`.
## Quality bar
- [ ] `spectoflow deliver` exited 0 in this session, not an earlier one.
- [ ] No token was written to a file, put on a command line or printed.