Deploy your project in 6 steps! For free!
Netlify is a San Francisco-based cloud computing company that offers hosting and serverless backend services for web applications and static websites. Netlify is a web developer platform that multiplies productivity. By unifying the elements of the modern decoupled web, from local development to advanced edge logic, Netlify enables a 10x faster path to much more performant, secure, and scalable websites and apps.
In the past I was working with firebase, it worked well, but little confusing. I decided to try netlify to compare deploying system!. Turn out it is much easier! Let me tell you how you can do it!
- You need to have an existing account. (or just create one for free)! Go to the Netlify webpage and Sign up!
- You need to have a repository for your app. I am using GitHub for my projects but it’s not mandatory. Here are some Git providers you can use:
NOTE: If you have an app with a separate back-end and front-end (full-stack application), make sure you are deploying only a front-end repository. It’s because by deploying, it’s reaching out for some HTML file, so you want to make sure it’s the right one.
3. After logging in / signing in , click on “New site from Git’’.
At this point you can choose the Git provider:
It should open up the authentication system to connect with your Git provider. You should be able to see a list of your repository.
4. Choose the repository you wish to deploy from the displayed list.
Here you need to choose the owner and brunch you want to deploy from.
5. Advanced build settings. This is where you need to add your key for API if you are using it in your app, or whatever you will keep in the ‘.env’ file.
Then click the “Deploy site” button.
5. Site deploy in progress.
Don’t be surprised when you see this alert. It’s because we didn’t make the prerequisite actions that will make us able to deploy our website. You need to open your application in your VSCode (or whatever you are using to code) and simply run:
yarn run build
It’s gonna create a version of your application as a “build” version of it.
6. Go back to Netlify webpage and on the second line of navigation, click “Deploys” -> “Trigger deploy” -> “Deploy site”:
This will start the deploying process. If there are any errors, we will see it now. If you see an error while deploying I have one trick for you to try, before you start freaking out!:
Go to your Netlify account, then “Deploy” -> “Deploy settings” and on the “Build command:” make sure include:
CI=yarn(or npm) run build
Just like that! Your application is deployed! Enjoi the demo!