Hello Dev Friends.This is the Part 2 of How to deploy React Apps to Netlify as here I am going to explain you how to deploy your App to Netlify through CLI.
So let us get started by opening the VS Code.
Follow the below steps once your project is ready to deploy.
1.Make sure you are in your current project's folder.Install netlify globally if you are doing it for the first time.
npm install -g netlify-cli
2.Now run the below command in terminal,
It will ask you to login to Netlify and to authorise for the first time in your browser.
Now press enter in terminal and give other details and site name which is optional.
Here you can choose "Yes,create deploy site for manually." if you want to do without github or you can choose github option.
Once the deployment is done,we will get the below screen.
3.Now run the below command for deployment,
4.Now finally execute the below command,
netlify deploy --prod
and choose current path.
This is our project which I have used just for explaining this process.
Let me know what you create.
Happy Learning :)