When you created a static website, whether it's a project with client or just for portfolio, you usually want to make it online. One of modern hosting especially for a static website is Netlify. Netlify is nice to hosting from a very simple web, or generated website using Gatsby or Gridsome, and it's free to get started. There are very simple steps to host your website to Netlify.
1. Sign Up
You can sign up with your GitHub, GitLab, or Bitbucket account to easily connect your repository later.
2. Select Git provider
After you sign up, you can start to deploy your website. First select the git provider where you put your website project. Select one and authorized Netlify to access your repository list. I personally use GitLab.
3. Select Repository
Now after you authorized Netlify to your git provider, all your repository will showed up. Select which repository that you want to deploy.
4. Setting the build option
You can choose which branch that will deployed to the hosting, so it's not always have to master branch.
If you deploying a generated site with such as Gridsome, you need to add gridsome build in Build Command, and dist in Publish directory to automatically start building the website right after you push to the branch that you choose to deploy before.
And that's it! Now your website is published and can access via internet with yourwebiste.netlify.app domain. You can use your custom domain by setting the DNS configuration. Read the official documentation to know more how to do that. From now, when ever you want to make a change to your website, just push your change to the branch that you choose and Netlify will build the change for you. Thank you for reading :)
Top comments (0)