Guides & Tutorials

Publish your site assets with the Netlify CLI

Guides & Tutorials

Publish your site assets with the Netlify CLI

Throughout December we'll be highlighting a different Netlify feature each day. It might just be the thing you need to unlock those creative juices, and dust off that domain you registered but never deployed! Keep an eye on the blog and on Twitter for each feature!

Did you know that you can publish your sites to the web without leaving the comfort of your command line?

The open source Netlify CLI includes lots of helpful features (expect to see learn more about that in upcoming post this month!) and deploying production or preview versions of your site can be done with the handy command: netlify deploy

💡 Install the Netlify CLI for all sorts of web development helpers and utilities with this command: npm install -g netlify-cli

The first time you run netlify deploy from a local project folder, it will give you the option of deploying to an existing site or creating a new site in a project team, and then deploy your specified folder to Netlify.

For added safety, the default target for a netlify deploy is a unique preview URL which the CLI helpful returns to you as a link to inspect and share. Ready to deploy to production? Then you'll want to use the prod flag:

netlify deploy —-prod

More powerful deployment pipelines await you via Netlify's build infrastructure, but this command is very useful for sending your assets to Netlify where we'll publish them to the global hosting infrastructure for you.

Happy deploying!

More information

Keep reading

Recent posts

Book cover with the title Deliver web project 10 times faster with Jamstack enterprise

Deliver web projects 10× faster

Get the whitepaper