The Netlify Deploy skill gives Codex everything it needs to deploy web projects to Netlify without leaving your workspace. Ask Codex to “deploy this site to Netlify”, “publish my app”, or “host this on Netlify” and it will verify your authentication, link or create a Netlify site, install dependencies, and push a deployment — surfacing the deploy URL when done. Preview deploys are the safe default; production only runs when you explicitly ask for it.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/openai/skills/llms.txt
Use this file to discover all available pages before exploring further.
Trigger Phrases
Codex activates this skill when it detects Netlify deployment intent. Common phrases include:- “deploy to Netlify”
- “publish my site on Netlify”
- “host this on Netlify”
- “push a preview to Netlify”
- “link this repo to Netlify and deploy”
Installing
Prerequisites
Netlify CLI
Runs via
npx netlify — no global install required. Codex invokes it directly.Authentication
A Netlify account with an active login session. Browser OAuth or an API token both work.
Project
A valid web project in the current directory — static HTML, a framework build, or anything Netlify can build.
Network Access
If sandbox networking blocks outbound requests, Codex will ask to rerun with
sandbox_permissions=require_escalated.Deployment Workflow
Verify Authentication
Codex checks whether you are logged into Netlify:API key alternative — set the token as an environment variable:Generate tokens at:
- ✅ Authenticated — shows your logged-in email and site link status.
- ❌ Not authenticated — Codex prompts you to log in.
https://app.netlify.com/user/applications#personal-access-tokensDetect Site Link Status
From the
netlify status output, Codex determines whether the project is already linked to a Netlify site, or whether a site needs to be created or linked.Link or Create a Site
If already linked — skip ahead to dependency installation.If not linked, Codex first tries to link via Git remote:If no Netlify site exists for this repo, Codex falls back to interactive site creation:This walks you through choosing a team, setting a site name, and configuring build settings.
Deploy
Preview deploy (default for existing sites):Creates a deploy preview with a unique URL for testing before going live.Production deploy (only when explicitly requested):
Build Configuration
If anetlify.toml file exists in your project root, the CLI picks it up automatically. If not, the CLI will prompt for a build command and publish directory.
Common framework defaults Codex will suggest:
| Framework | Build Command | Publish Directory |
|---|---|---|
| Next.js | npm run build | .next |
| React (Vite) | npm run build | dist |
| Static HTML | (none) | . (current dir) |
Error Handling
Not logged in
Run
npx netlify login to authenticate via browser OAuth, or set NETLIFY_AUTH_TOKEN.No site linked
Run
npx netlify link to connect an existing site, or npx netlify init to create a new one.Build failed
Check the build command and publish directory. Verify dependencies are installed and review build logs for specifics.
Publish directory not found
Confirm the build command completed successfully and the publish path in
netlify.toml or CLI settings is correct.