$npx -y skills add webflow/webflow-skills --skill deploy-guideStep-by-step guide for deploying Webflow Code Components to a workspace. Covers authentication, pre-flight checks, deployment execution, and verification.
| 1 | # Deploy Guide |
| 2 | |
| 3 | Guide users through deploying their code component library to Webflow. |
| 4 | |
| 5 | ## When to Use This Skill |
| 6 | |
| 7 | **Use when:** |
| 8 | - User is ready to deploy components to Webflow |
| 9 | - User asks how to share, publish, or deploy their library |
| 10 | - First-time deployment to a workspace |
| 11 | - Step-by-step deployment walkthrough needed |
| 12 | |
| 13 | **Do NOT use when:** |
| 14 | - Deployment failed (use troubleshoot-deploy instead) |
| 15 | - Just validating before deploy (use pre-deploy-check instead) |
| 16 | - Setting up local development (use local-dev-setup instead) |
| 17 | |
| 18 | **Note:** The CLI command is `webflow library share`. This skill uses "deploy" as the user-facing term. |
| 19 | |
| 20 | ## Instructions |
| 21 | |
| 22 | ### Phase 1: Pre-Flight Checks |
| 23 | |
| 24 | 1. **Verify project is ready**: |
| 25 | - Check webflow.json configuration |
| 26 | - Ensure all dependencies installed |
| 27 | - Run pre-deploy-check skill checks |
| 28 | |
| 29 | 2. **Check authentication status**: |
| 30 | - Look for existing .env with API token |
| 31 | - Verify WEBFLOW_WORKSPACE_API_TOKEN if set |
| 32 | - Prepare for authentication if needed |
| 33 | |
| 34 | 3. **Confirm deployment target**: |
| 35 | - Which workspace? |
| 36 | - New library or update existing? |
| 37 | |
| 38 | ### Phase 2: Authentication |
| 39 | |
| 40 | 4. **Guide authentication**: |
| 41 | - Interactive: Follow CLI prompts |
| 42 | - CI/CD: Use --api-token flag |
| 43 | - Show how to get workspace API token if needed |
| 44 | |
| 45 | ### Phase 3: Deployment |
| 46 | |
| 47 | 5. **Execute deployment**: |
| 48 | - Run `npx webflow library share` |
| 49 | - Monitor for errors |
| 50 | - Capture output |
| 51 | |
| 52 | ### Phase 4: Verification |
| 53 | |
| 54 | 6. **Verify deployment**: |
| 55 | - Check Webflow Designer for components |
| 56 | - Test component functionality |
| 57 | - Confirm all components appear |
| 58 | |
| 59 | 7. **Provide next steps**: |
| 60 | - How to use components in Designer |
| 61 | - How to update in future |
| 62 | - Common post-deploy tasks |
| 63 | - If deployment fails, use [troubleshoot-deploy](../troubleshoot-deploy/SKILL.md) to diagnose and fix issues |
| 64 | |
| 65 | ## Deployment Workflow |
| 66 | |
| 67 | ### Standard Deployment |
| 68 | |
| 69 | ``` |
| 70 | 📦 Deploying Code Components |
| 71 | |
| 72 | Step 1: Pre-flight checks |
| 73 | ├── webflow.json ✅ |
| 74 | ├── Dependencies ✅ |
| 75 | └── Build test ✅ |
| 76 | |
| 77 | Step 2: Authentication |
| 78 | ├── Checking for existing auth... |
| 79 | └── Found valid token ✅ |
| 80 | |
| 81 | Step 3: Deploying |
| 82 | ├── Bundling components... |
| 83 | ├── Uploading to workspace... |
| 84 | └── Processing... |
| 85 | |
| 86 | Step 4: Verification |
| 87 | ├── Library registered ✅ |
| 88 | └── 4 components available ✅ |
| 89 | |
| 90 | 🎉 Deployment Complete! |
| 91 | ``` |
| 92 | |
| 93 | ### CI/CD Deployment |
| 94 | |
| 95 | ```bash |
| 96 | # Set environment variable |
| 97 | export WEBFLOW_WORKSPACE_API_TOKEN=your-token-here |
| 98 | |
| 99 | # Deploy without prompts |
| 100 | npx webflow library share --no-input |
| 101 | ``` |
| 102 | |
| 103 | ## Examples |
| 104 | |
| 105 | **User prompt:** |
| 106 | ``` |
| 107 | Deploy my components to Webflow |
| 108 | ``` |
| 109 | |
| 110 | **Response:** |
| 111 | ``` |
| 112 | 🚀 Deploy Guide: Code Components |
| 113 | |
| 114 | Let me guide you through deploying your component library. |
| 115 | |
| 116 | --- |
| 117 | |
| 118 | ## Step 1: Pre-Flight Checks |
| 119 | |
| 120 | Running validation... |
| 121 | |
| 122 | ✅ webflow.json configured |
| 123 | ✅ Dependencies installed |
| 124 | ✅ Build succeeds |
| 125 | ✅ Bundle size: 2.3MB (under 50MB limit) |
| 126 | |
| 127 | All checks passed! Ready to deploy. |
| 128 | |
| 129 | --- |
| 130 | |
| 131 | ## Step 2: Authentication |
| 132 | |
| 133 | **Option A: Interactive (Recommended for first time)** |
| 134 | |
| 135 | Run the deploy command: |
| 136 | ```bash |
| 137 | npx webflow library share |
| 138 | ``` |
| 139 | |
| 140 | This will: |
| 141 | 1. Open your browser for Webflow login |
| 142 | 2. Ask you to authorize the app |
| 143 | 3. Save credentials to .env |
| 144 | |
| 145 | **Option B: API Token (For CI/CD or returning users)** |
| 146 | |
| 147 | 1. Get your Workspace API Token: |
| 148 | - Go to Webflow Dashboard |
| 149 | - Navigate to your Workspace Settings |
| 150 | - Find "Apps & Integrations" → "Manage" |
| 151 | - Under "Workspace API Access", click "Generate API Token" |
| 152 | - Copy the token |
| 153 | |
| 154 | 2. Run with token: |
| 155 | ```bash |
| 156 | npx webflow library share --api-token YOUR_TOKEN_HERE |
| 157 | ``` |
| 158 | |
| 159 | Or set environment variable: |
| 160 | ```bash |
| 161 | export WEBFLOW_WORKSPACE_API_TOKEN=YOUR_TOKEN_HERE |
| 162 | npx webflow library share |
| 163 | ``` |
| 164 | |
| 165 | --- |
| 166 | |
| 167 | ## Step 3: Deploy |
| 168 | |
| 169 | Ready to deploy? Run: |
| 170 | |
| 171 | ```bash |
| 172 | npx webflow library share |
| 173 | ``` |
| 174 | |
| 175 | Expected output: |
| 176 | ``` |
| 177 | ✓ Bundling components... |
| 178 | ✓ Authenticating... |
| 179 | ✓ Uploading library... |
| 180 | ✓ Processing... |
| 181 | |
| 182 | Library "My Component Library" successfully shared! |
| 183 | |
| 184 | Components: |
| 185 | - Button |
| 186 | - Card |
| 187 | - Accordion |
| 188 | - Modal |
| 189 | |
| 190 | View in Designer: Open any site in your workspace |
| 191 | ``` |
| 192 | |
| 193 | --- |
| 194 | |
| 195 | ## Step 4: Verify in Designer |
| 196 | |
| 197 | After deployment: |
| 198 | |
| 199 | 1. **Open Webflow Designer** for any site in your workspace |
| 200 | 2. **Open Add Panel** (A key or + button) |
| 201 | 3. **Find "Components"** section |
| 202 | 4. **Look for your library** under custom components |
| 203 | 5. **Drag a component** onto the canvas to test |
| 204 | |
| 205 | --- |
| 206 | |
| 207 | ## Step 5: Next Steps |
| 208 | |
| 209 | ✅ **Your components are live!** |
| 210 | |
| 211 | **To update components later:** |
| 212 | ```bash |
| 213 | # Make your changes, then re-deploy |
| 214 | npx webflow library share |
| 215 | ``` |
| 216 | |
| 217 | **Important notes:** |
| 218 | - Updates replace the entire library (no partial updates) |
| 219 | - Existing component instances will update automatically |
| 220 | - Don't rename .webflow.tsx files (breaks instances) |
| 221 | |
| 222 | --- |
| 223 | |
| 224 | 💡 **Tips:** |
| 225 | - Add .env to .gitignore to protect your token |
| 226 | - Use `--verbose` flag for debuggi |