DEV Community

Cover image for How to Choose the Best Host for Your GitHub Blog
Robert Schleinhege for IONOS

Posted on • Originally published at docs.ionos.space

How to Choose the Best Host for Your GitHub Blog

If you're a developer, you know that GitHub is the go-to platform for version control and code collaboration. These features also mean GitHub can be an excellent platform for storing your blog files. And, if you choose the right host for your blog, deploying new blog posts can be as simple as committing your changes.

In this article, we'll discuss the benefits of storing your blog files as a GitHub Repository and how to select the best host for your GitHub blog.

The Benefits of Storing Your Blog Files as a GitHub Repository

GitHub offers several features that make it ideal for bloggers:

  • Faster Page Speed and Less Server Load. Unlike a blog created with a CMS such as WordPress, blog content is stored on GitHub in a series of files, rather than a database. There's no need to connect to a database to display your blog's content to readers. This translates into faster page speed with less load on the server.
  • Automatic Version Control. Storing your blog files with GitHub provides automatic version control. This means you can always go back and view previous versions of your blog. You'll also have a complete record of any changes along with who made them.
  • Easy Collaboration. If multiple people contribute to your blog, using GitHub makes it easier to manage contributions and edits. New content can be deployed to a staging environment for review and then integrated into the live version.
  • Multiple Template and Plug-In Options. Because GitHub is a widely used platform, there is a good chance that someone else has already created a theme or plugin that you can use for your blog.

Options for Hosting Your GitHub Blog

Once you've created your GitHub blog, you'll need to find a host to serve your blog content out to the Internet. You have a few options for hosting your GitHub blog, depending on your needs.

  • Self-Hosting. Many developers host their blogs on their own servers. If you are already running a private web server, or if you want more control than you have using a hosting service, you may choose to self-host your blog. There are a variety of tools you can use to help automate your blog's workflow.
  • GitHub Pages. GitHub offers a free hosting solution called GitHub Pages. GitHub Pages works with Jekyll, a popular static site generator. Your blog content is automatically deployed to GitHub Pages whenever you push your changes to your GitHub repository. GitHub Pages is an excellent solution for a small blog, but you may run into limitations as you grow.
  • Shared Hosting with GitHub Support. Deploy Now from IONOS allows you to deploy static sites and PHP apps directly via GitHub. Your blog is stored on IONOS reliable shared hosting infrastructure in Europe and North America.

How to Choose a Hosting Solution for Your GitHub Blog

Choosing the right host for your GitHub Blog depends on your needs and plans for your blog. This chart can help you decide which hosting solution is right for your blog.

FEATURES SELF-HOSTED GITHUB PAGES DEPLOY NOW
Pricing $$$ FREE (with restrictions) 1 $4.00/Month
Total Control of Environment
HTTPS Support
Custom Domain Support
Automatic Deployment
Auto Deploy to Staging Environment
Automatic Deployment from Static Site Generator Jekyll 2 Jekyll, Hugo, Gatsby, Gridsome, Docusaurus, Vuepress, Vitepress, NuxtJS (static), NextJS (static), Hexo, Metalsmith, 11ty, UmiJS, Astro, Scully, ElderJS, Middleman, Nanoc, Pelican, mkdocs, Jigsaw, Sculpin
Private Repository Support With Upgraded Plan 3
Deploy One Branch to Multiple Environments
Auto Deploy Dynamic PHP Environments
Database Support Manual Configuration Maria DB
Available Storage Subject to Hardware Constraints 1 GB 10 GB
Bandwidth Support Subject to Hardware Constraints approx 100 GB/month Unmetered
1 GitHub Pages cannot be used for online business, e-commerce site, or commercial purposes.
2 Must manually create GitHub Actions to deploy with other static site generators.
3 Support for Private Repositories only available with GitHub Pro, GitHub Team, or GitHub Enterprise

Deploy Now: The Hosting Solution That Automates Deploying Directly from GitHub

IONOS’ Deploy Now analyzes your files and automatically builds a customizable workflow to automate deploying your blog to IONOS’ secure and reliable hosting platform. With Deploy Now, you can automatically deploy your blog updates each time you create a post or make a change to your blog.

Get started today by learning more about Deploy Now or creating a sample project.

Top comments (8)

Collapse
 
corentinbettiol profile image
Corentin Bettiol

Selhosted Pricing - $$$

I paid 50€ in 2017 for a small old refurbished computer and never paid anything since. Still powers my websites :)

5 years = 60 months, 50/60 = 0.8€/month.

3 Support for Private Repositories only available with GitHub Pro, GitHub Team, or GitHub Enterprise

Github is free for hosting unlimited private repositories since april of 2020.

Collapse
 
roberts profile image
Robert Schleinhege

Regarding the first topic: Interesting! Did you take electricity costs into account as well?
Regarding the second quote: This did refer to actually deploying the code of a private repository to a webspace via GitHub Pages.

Collapse
 
corentinbettiol profile image
Corentin Bettiol • Edited

I did some faaast calculations using a simulator, and here it is:

Image description

The computer is a dell optiplex fx160. It could consume more (when a cpu-intensive task is running), but the reality is that there are very few visits on my websites, so I took 10W for idle consumption.

So 0.8 + 0.7 = 1.5€/month.

Even at 20W it's still 0.8 + 2.7 = 3.5€/month.

The "server" is running 5+ websites, using python/django/sqlite, plain html/css (static websites), and php/mariadb.


Regarding the second quote: This did refer to actually deploying the code of a private repository to a webspace via GitHub Pages.

Whoops my bad.

Thread Thread
 
roberts profile image
Robert Schleinhege

Thanks for the insights! Did you ever accidentally caused downtimes because the fuse has blown?

Thread Thread
 
corentinbettiol profile image
Corentin Bettiol

I live in a rural area where power failure tends to happen regularly. The uptime of my server rarely goes past the 100 days mark (I manually reboot it when the power comes back), but when I lived in a bigger city it crossed the year of uptime :)

Image description

You can see some information on this screenshot of htop (htop is the program that uses the most the CPU :P).

Thread Thread
 
corentinbettiol profile image
Corentin Bettiol

I tested my simple php site and my django website using apachebench (ab) simultaneously (two commands launched at the same time):

$ ab -n 100 -c 10 <url>
Enter fullscreen mode Exit fullscreen mode

Small php website:

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       28  287 143.7    273     719
Processing:    34   73  51.6     61     288
Waiting:       33   72  51.6     60     288
Total:         77  360 136.9    340     782
Enter fullscreen mode Exit fullscreen mode

Django website (heavier):

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       35   98  99.8     49     443
Processing:   364 1150 280.0   1107    2094
Waiting:      363 1147 280.0   1105    2091
Total:        399 1248 347.0   1153    2478
Enter fullscreen mode Exit fullscreen mode
Collapse
 
luxxie profile image
Sunny Byrne

Thank you so much for this!! I needed to hear all of this right now. I was so stuck. Thank you !

Collapse
 
roberts profile image
Robert Schleinhege

Your welcome :) I appreciate your feedback