home / skills / ominou5 / funnel-architect-plugin / deploy-netlify

deploy-netlify skill

/skills/deploy-netlify

This skill deploys funnel pages to Netlify, configures redirects, env vars, and custom domains for smooth production launches.

npx playbooks add skill ominou5/funnel-architect-plugin --skill deploy-netlify

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
1.9 KB
---
name: deploy-netlify
description: >
  Deploys funnel pages to Netlify. Covers CLI setup, deploy commands,
  environment variables, custom domains, and redirect configuration.
---

# Deploy to Netlify

## Prerequisites
- Node.js installed
- Netlify account (free tier works for funnels)

## Setup

```bash
# Install Netlify CLI
npm install -g netlify-cli

# Login to Netlify
netlify login

# Initialize project (first time only)
netlify init
```

## Deploy Commands

```bash
# Deploy a preview (draft URL)
netlify deploy --dir=.

# Deploy to production
netlify deploy --dir=. --prod
```

## Netlify Configuration (`netlify.toml`)

```toml
[build]
  publish = "."

# Redirect www to non-www
[[redirects]]
  from = "https://www.example.com/*"
  to = "https://example.com/:splat"
  status = 301

# Custom 404 page
[[redirects]]
  from = "/*"
  to = "/404.html"
  status = 404

# Headers for performance
[[headers]]
  for = "/*.html"
  [headers.values]
    Cache-Control = "public, max-age=300"

[[headers]]
  for = "/*.css"
  [headers.values]
    Cache-Control = "public, max-age=31536000, immutable"

[[headers]]
  for = "/*.js"
  [headers.values]
    Cache-Control = "public, max-age=31536000, immutable"

[[headers]]
  for = "/*.webp"
  [headers.values]
    Cache-Control = "public, max-age=31536000, immutable"
```

## Custom Domain
1. Go to **Site settings → Domain management → Add custom domain**
2. Add a CNAME record pointing to `[site-name].netlify.app`
3. Enable HTTPS (automatic with Let's Encrypt)

## Environment Variables
Set via Netlify dashboard: **Site settings → Environment variables**
Or via CLI: `netlify env:set KEY value`

## Form Handling
Netlify has built-in form handling — add `netlify` attribute:
```html
<form name="lead-capture" method="POST" data-netlify="true">
  <input type="email" name="email" required>
  <button type="submit">Subscribe</button>
</form>
```

Overview

This skill deploys sales funnel pages to Netlify and guides you through CLI setup, deploy workflows, environment variables, custom domains, redirects, headers, and form handling. It focuses on getting a high-converting funnel live quickly while preserving performance and SEO-friendly redirects. Use it to move static HTML funnels from local development to production with repeatable commands and best practices.

How this skill works

The skill walks you through installing and logging into the Netlify CLI, initializing a site, and using netlify deploy commands for preview and production publishes. It supplies a recommended netlify.toml with redirects, caching headers, and a custom 404 route, and shows how to configure environment variables and built-in Netlify form handling. You get practical commands and configuration snippets to automate deploys and preserve page speed and routing behavior.

When to use it

  • When you need to publish static landing pages or funnels quickly
  • When you want preview builds for draft reviews before production
  • When you must enforce canonical domain and redirect rules
  • When you need to add environment variables (API keys, analytics) securely
  • When you want Netlify’s built-in form handling for lead capture

Best practices

  • Install and authenticate netlify-cli once per workstation and script deploy commands in CI
  • Keep publish directory minimal (only built assets) to reduce upload time
  • Use the provided netlify.toml for consistent redirects and long cache headers on static assets
  • Enforce non-www or www canonical redirect to avoid duplicate-content issues
  • Store API keys and secrets via Netlify environment variables rather than inlined files

Example use cases

  • Deploy a new landing page and share a preview URL with stakeholders using netlify deploy
  • Push production funnel updates with netlify deploy --prod in your CI pipeline
  • Configure a custom domain and enable HTTPS for conversion-tracking and trust signals
  • Add Netlify form handling to capture leads without external form services
  • Tune cache headers to improve LCP and repeat-visit speed for your funnel pages

FAQ

How do I deploy a draft preview?

Run netlify deploy --dir=. to create a draft URL without affecting production.

How do I publish to production?

Run netlify deploy --dir=. --prod or hook that command into your CI after successful tests.

Where do I set environment variables?

Set them in Site settings → Environment variables in the dashboard or use netlify env:set KEY value via the CLI.