Netlify
Deploy Commands
Deploy sites to Netlify from the CLI. Create draft deploys for previewing, push to production, and manage deploy locks for coordinated releases.
10 commands
Pro Tips
Use 'netlify deploy' for a draft preview URL first, then 'netlify deploy --prod' when ready for production.
Skip builds with 'netlify deploy --dir=dist --prod' to deploy a local build directly — faster for debugging.
Use 'netlify deploy --alias feature-name' to create a named deploy URL like feature-name--yoursite.netlify.app.
Common Mistakes
Running 'netlify deploy --prod' pushes to production immediately. Always test with a draft deploy first.
Make sure '--dir' points to your build output directory. Deploying the wrong directory exposes source files.