How to Deploy A Website to Netlify
Netlify is a platform that provides tools for deploying websites in just a few clicks. it’s completely free for an unlimited number of projects for individuals, making it ideal for personal websites and small projects. To deploy your site, you need to commit your code into a git repository and push it to the git hosting provider (such as Bitbucket, GitLab, or GitHub). For this example, I will be using a GitHub. Once you have pushed your code to your Github repository, you will need to visit the Netlify Create a new site page: https://app.netlify.com/start. If you don't have a Netlify account, you can use your GitHub (or other provider) account to sign-in/log-in.
Connect to git provider
In the next section Continuous Deployment, select the git provider that you will be using, in our case GitHub. At this point, Netlify will ask you to authorize access to your GitHub account. Once the permission to access your GitHub by Netlify is authorized, it will ask you to choose the project you want to host it, like in the photo below:
Pick a repository
In the next section, you need to set Netlify which branch to deploy from. In git, the default branch is named master, use this unless you don't want to deploy to another branch. Netlify has continuous deployment which means every time you push your code to your branch Netlify will re-deploy the site. This feature allows fast changes on your website.
Build options, and deploy!
If you have built your site using a static site generator (such as Gatsby.js) you will need to specify two more options. The first one is the build command that it is the command you use to build your static files (such as gatsby build). The second one is the publish directory which is the directory where your generated files are located.
Once you set all the required settings, you can Deploy the site. After a short time, your site will be available at a URL provided by Netlify. You can change the URL to something for example [something..].netlify.com you can find it at Settings / General / Site details. If you have a custom domain name, Netlify also provides a free TLS certificate with every custom domain name.