Simplifiy netlify integration page

This commit is contained in:
BekahHW 2025-12-19 14:26:11 -05:00
parent ce3e5ecf86
commit fa0710ea4b

View file

@ -1,395 +1,113 @@
---
title: "Netlify Integration"
description: "Give your agents access to Netlify's API and CLI to manage deployments and optimize website performance"
description: "Connect **Netlify** to Mission Control so agents can automatically catch performance regressions by comparing preview and production deploys when code ships."
---
## Overview
Connect Netlify to Continue Mission Control to give your agents access to Netlify's API and CLI. Create projects, deploy applications, configure domains, and manage infrastructure with natural language. When Netlify is enabled, Continue can analyze bundle sizes, audit performance, and prevent performance regressions.
<Card title="What You Can Do with Netlify Integration" icon="bolt">
- Run Lighthouse audits on PR previews and production
- Compare bundle sizes and analyze performance regressions
- Automatically detect configuration issues (minification, caching, tree-shaking)
- Block PRs that introduce critical performance problems
- Generate detailed performance reports with actionable fixes
- Create projects and manage domains with natural language
- Configure build settings and environment variables
<Card
title="Connect Netlify to enable agents to:"
icon="bolt"
href="https://hub.continue.dev/integrations/netlify"
>
- Run Lighthouse audits on preview and production deploys
- Compare bundle sizes and detect performance regressions
- Surface configuration issues like disabled minification or caching
- Post clear performance summaries directly to pull requests
</Card>
## Setup
## Official Workflow Templates
<Steps>
The following **official workflow template** is maintained by the Continue team and is available directly in the Mission Control Hub. This workflow is designed to work out of the box and represents the recommended way to automate Netlify performance checks.
<Step title="Navigate to Integrations">
Go to your [Integrations Settings](https://hub.continue.dev/integrations).
</Step>
<Step title="Connect Netlify">
Click "Connect" next to Netlify. You'll need:
- **Personal Access Token**: Generate from Netlify account settings
</Step>
<Step title="Generate Netlify Access Token">
To create a personal access token:
1. Log into your [Netlify account](https://app.netlify.com)
2. Go to **User Settings** → **Applications** → **Personal access tokens**
3. Click "New access token"
4. Give it a descriptive name (e.g., "Continue Mission Control")
5. Copy the token immediately
</Step>
<Step title="Add Token to Mission Control">
Paste your access token into the integration form and click "Create Connection"
</Step>
</Steps>
<Tip>
**Token Scope**: Personal access tokens have full access to your Netlify account. Create a token specifically for Continue to maintain security and easy revocation if needed.
</Tip>
## Workflows
### Optimize Website Performance
**Trigger**: On PR merge
**Description**: Run Lighthouse audits on PR preview and production to compare performance
When a pull request is merged, this performance-focused workflow automatically:
1. **Retrieves Deployment Information** - Uses Netlify MCP to get:
- Production deploy URL and metadata
- Deploy preview URL for the PR branch
- Build artifacts and configuration
2. **Analyzes Bundle Sizes** - Compares JavaScript and CSS bundles:
- Downloads and measures all asset files
- Calculates total bundle size for both deploys
- Identifies largest individual files
- Detects unminified or bloated assets
3. **Reviews Build Configuration** - Examines:
- `vite.config.ts` or `webpack.config.js` for minification settings
- `netlify.toml` for cache headers and build commands
- `package.json` for redundant or oversized dependencies
4. **Identifies Performance Issues** - Classifies problems by severity:
- 🔴 **Critical**: Minification disabled, bundle size >50% increase, no caching
- ⚠️ **Warning**: No code splitting, large chunks >500KB, 20-50% bundle increase
- ℹ️ **Info**: Suboptimal configurations, bundle size less than 20% increase
5. **Generates Actionable Report** - Posts to PR with:
- Bundle size comparison table
- Root cause analysis with file references and line numbers
- Code fixes that can be copy-pasted
- Merge recommendation (Approved/Review Needed/Blocked)
- Expected improvements from each fix
<Card title="Why This Matters" icon="gauge-high">
Performance regressions often slip through code review because:
- Bundle size increases aren't visible in diffs
- Configuration errors (disabled minification) go unnoticed
- Redundant dependencies accumulate over time
This workflow catches these issues automatically before they reach production.
</Card>
<Info>
**Smart Analysis**: The agent doesn't just report bundle sizes—it analyzes build configurations, identifies root causes, and provides specific code fixes with line numbers.
</Info>
<CardGroup cols={2}>
<Card title="Optimize Website Performance" icon="gauge-high">
When a pull request is merged, runs Lighthouse audits comparing preview and production deploys to catch performance regressions before they reach users.
</Card>
</CardGroup>
### Performance Issue Classification
The agent categorizes issues by severity:
The Netlify performance workflow classifies issues so you can quickly understand impact and urgency.
<AccordionGroup>
<Accordion title="🔴 Critical — Block merge">
Issues that indicate severe regressions or broken production configuration.
<Accordion title="🔴 Critical - Block Merge">
**Issues that must be fixed before merging:**
- Minification disabled (`minify: false`)
- Tree-shaking disabled (`treeshake: false`)
- No caching headers (`Cache-Control: no-cache`)
- Production source maps enabled
- Bundle size increase >50%
- Redundant dependencies (lodash + underscore, moment + date-fns + dayjs)
**Action**: Agent recommends blocking the merge
- Minification disabled
- Tree-shaking disabled
- Missing or unsafe cache headers
- Production source maps enabled
- Bundle size increase greater than 50%
</Accordion>
<Accordion title="⚠️ Warning - Review Required">
<Accordion title="⚠️ Warning — Review required">
Issues that may negatively impact performance and should be reviewed before release.
**Issues that need attention:**
- No code splitting (single large bundle)
- Suboptimal cache headers (max-age too low)
- Large individual chunks (>500KB)
- Unoptimized images
- Bundle size increase 20-50%
**Action**: Agent recommends careful review before merging
- No code splitting (single large bundle)
- Large individual chunks (>500KB)
- Bundle size increase between 20–50%
- Suboptimal cache headers
</Accordion>
<Accordion title="ℹ️ Info - Optimization Opportunities">
<Accordion title="ℹ️ Info — Optimization opportunity">
Non-blocking improvements and suggestions.
**Non-blocking improvements:**
- Could use better code splitting
- Modern browser features could replace polyfills
- CSS not extracted/split
- Bundle size increase less than 20%
**Action**: Agent approves merge but suggests optimizations
- Better code splitting opportunities
- Redundant dependencies
- Unoptimized images
- Bundle size increase under 20%
</Accordion>
## Use Cases
### Infrastructure as Code
Manage Netlify infrastructure with natural language:
<Card title="Infrastructure Manager" icon="server">
**Task Example**: "Create a new Netlify site for the marketing-site repo with custom domain marketing.company.com"
**What the Agent Does**:
- Creates new Netlify project via API
- Connects to specified Git repository
- Configures build settings and commands
- Sets up custom domain and SSL
- Configures environment variables
**Run in Mission Control**: Run manually when creating new projects
</Card>
### Build Configuration Optimization
Automatically optimize build settings:
<Card title="Build Optimizer" icon="wrench">
**Task Example**: "Audit all Netlify sites for missing cache headers and suboptimal build configs"
**What the Agent Does**:
- Reviews `netlify.toml` and build settings
- Checks cache header configurations
- Identifies missing optimizations
- Generates recommended configuration changes
- Can apply fixes automatically
**Run in Mission Control**: Run monthly or after adding new sites
</Card>
### Performance Auditing
Prevent performance regressions before deployment:
<Card title="Performance Auditor" icon="gauge-high">
**Task Example**: "Analyze bundle sizes and configurations, block PRs with critical performance issues"
**What the Agent Does**:
- Compares preview and production bundle sizes
- Detects disabled minification or tree-shaking
- Identifies redundant dependencies (lodash + underscore, multiple date libraries)
- Checks cache configuration
- Posts detailed report with fixes to PR
- Recommends approval, review, or blocking merge
**Run in Mission Control**: Triggered automatically on PR merge
</Card>
### Dependency Analysis
Identify and fix problematic dependencies:
<Card title="Dependency Auditor" icon="magnifying-glass">
**Task Example**: "Find redundant or oversized dependencies across all projects"
**What the Agent Does**:
- Scans `package.json` files in all Netlify sites
- Identifies duplicate functionality (multiple date/utility libraries)
- Finds oversized packages (>100KB)
- Suggests lightweight alternatives
- Calculates potential bundle size savings
**Run in Mission Control**: Run quarterly for dependency cleanup
</Card>
### Continuous Performance Monitoring
Track performance trends over time:
<Card title="Performance Tracker" icon="chart-line">
**Task Example**: "Generate a performance trend report for the last 30 deploys"
**What the Agent Does**:
- Queries deploy history via Netlify MCP
- Tracks bundle size over time
- Identifies gradual performance degradation
- Highlights deploysthat introduced regressions
- Generates visualization of trends
**Run in Mission Control**: Schedule weekly for ongoing monitoring
</Card>
### Domain and SSL Management
Manage domains using natural language:
<Card title="Domain Manager" icon="globe">
**Task Example**: "Add www.example.com to my site and configure SSL"
**What the Agent Does**:
- Configures custom domains via Netlify API
- Sets up SSL certificates automatically
- Configures DNS records and redirects
- Verifies domain setup and SSL status
**Run in Mission Control**: Run manually when adding domains
</Card>
## Running Netlify Agents in Mission Control
You can run Netlify-connected agents in two ways as [one-off tasks](../tasks) or automated [workflows](../workflows):
</AccordionGroup>
<Tip>
Start with manual tasks to refine your content queries, then automate repetitive content management and validation tasks.
Official workflow templates may expand over time as new patterns are validated. You can view, enable, and configure this workflow in **[Mission Control → Integrations → Netlify](https://hub.continue.dev/integrations/netlify)**.
</Tip>
## Advanced Use Cases
### 2. Automated Workflows
Set up agents to run automatically:
- **PR-triggered**: Audit performance when pull requests are merged
- **Scheduled**: Run weekly bundle size audits across all sites
- **Manual**: Analyze specific deploys or troubleshoot performance issues
<Tip>
Start with manual performance audits on specific PRs to refine your thresholds, then enable automated workflows to catch all performance regressions.
</Tip>
## Troubleshooting
<Accordion title="Authentication failures">
**Problem**: Agent can't connect to Netlify API
**Solutions**:
- Verify personal access token is correct
- Check that token hasn't been revoked
- Ensure token has necessary permissions
- Try regenerating the token
<Accordion title="Advanced: Custom Netlify Workflow Ideas">
These examples are not officially maintained by the Continue team, but illustrate what’s possible with custom workflows.
- Generate weekly performance trend reports across deploys
- Audit build configuration consistency across multiple sites
- Track bundle size growth over time
- Identify redundant or oversized dependencies
- Run performance checks on demand for specific deploys
</Accordion>
<Accordion title="Deploy not ready">
---
**Problem**: Deploy preview is still building when agent tries to analyze
## Access & Permissions
**Solutions**:
- Verify you have deploy permissions for the site
- Check that the site exists and is accessible
- Ensure build hooks are configured if using webhooks
- Review Netlify API rate limits
When connecting Netlify, you’ll provide a **personal access token** so Continue can query deploys and site configuration.
</Accordion>
- **Access token**
Generate a personal access token from your Netlify user settings. Tokens grant account-level access, so we recommend creating one specifically for Continue.
<Accordion title="No deploys found">
- **Permissions**
Approved access allows Continue to read deploy metadata, fetch build artifacts, and run performance analyses tied to workflows.
**Problem**: Agent can't find deploy preview for the branch
You can revoke or rotate the token at any time from your Netlify account settings.
**Solutions**:
- Verify branch name is correct
- Check that PR has triggered a Netlify build
- Ensure deploy previews are enabled in Netlify settings
- Confirm the repository is connected to Netlify
</Accordion>
<Accordion title="Bundle analysis failures">
**Problem**: Agent can't download or analyze bundles
**Solutions**:
- Verify deploy URLs are accessible
- Check for authentication requirements on preview
- Ensure assets are being generated correctly
- Review build logs for errors
</Accordion>
<Accordion title="Deploy previews not found">
**Problem**: Agent can't locate deploy previews
**Solutions**:
- Verify branch name is correct
- Check that deploy previews are enabled for the site
- Ensure the commit has triggered a build
- Wait for build to complete before querying
</Accordion>
<Accordion title="Performance monitoring issues">
**Problem**: Can't retrieve site performance metrics
**Solutions**:
- Verify Netlify Analytics is enabled for the site
- Check that your plan includes analytics access
- Ensure time range for queries is valid
- Review API documentation for metrics endpoints
</Accordion>
---
## Support & Resources
<CardGroup cols={2}>
<Card title="Netlify MCP Cookbook" icon="book-open" href="/guides/netlify-mcp-continuous-deployment">
Complete guide to continuous deployment automation with Netlify and Continue
<Card
title="GitHub Integration"
icon="github"
href="/mission-control/integrations/github"
>
Combine Netlify and GitHub to run performance checks on PR merges.
</Card>
<Card title="GitHub Integration" icon="github" href="/mission-control/integrations/github">
Combine Netlify with GitHub for end-to-end CI/CD automation
<Card
title="Netlify MCP Cookbook"
icon="book-open"
href="/guides/netlify-mcp-continuous-deployment"
>
Advanced examples for working with Netlify deployments using Continue agents.
</Card>
</CardGroup>