It was easier than I thought. For about $1 a month a website of my own with automated deployments.
Best part is I paid all the money towards yearly domain price of $12. Hosting and deployment of my site came for free.
The setup is easy and if you follow below steps it should be easy to get done.
Steps for creating a website
Steps to host the website on GitHub.
- Create a GitHub account.
- Create a folder called «docs» directly under your website folder.
- Add the contents of your public folder generated in the website creation step(this contains the website) to docs.
- Create a new repository on github and add all the folders to github.
- Go to settings of your repository and browse to GitHub pages section.
- Choose the source as your master/docs folder as shown in the image above.
- Github will automatically generate a blog url for you.
- If you want to setup a custom domain then follow these instructions.
Steps to host a website on Netlify
- Follow steps 1 and 4 from «host the website on GitHub».
- Create a netlify account.
- Click on Add a new project.
- Click on github and select the repository created in step 1.
- Select branch as «master», enter Publish directory as «public» and Build command as «hugo» as shown.
- Click on «build your site». If all goes well, your site will be built and deployed.
- Click on «view your site» to see your site.
- You can setup a custom domain by following these instructions.
Leave a comment if you have questions and I will be happy to help.