Publishing a single page from a repository

Both are free for one page. The difference is how much machinery you agree to maintain.

For a single static page, both options publish it for nothing. Choosing is about which machinery you take on with it.

A direct file serve beside a build pipeline with preview branches.
A direct file serve beside a build pipeline with preview branches.

What repository hosting does

It serves the files in a branch or folder as a website.

No build unless you add one, no server-side code, no preview addresses. Push, wait a few minutes, it is live. A custom domain is supported and free.

For a finished page, a documentation set or a portfolio, that is the complete list of requirements, and the absence of everything else is the feature.

What a deployment platform adds

A build runs on every push. Every branch gets its own preview address. Server-side functions are available. Deployments can be rolled back individually.

On an application under active development this is genuinely valuable and worth the setup.

On a page that changes twice a year, it is a pipeline maintaining a document, and the pipeline will break before the document does.

Repository hosting Deployment platform
Build step Optional Central
Preview per branch No Yes
Server-side code No Yes
Rollback By commit One click
First publish A few minutes Under a minute
Cost for one page Free Free

The decision in one question

Does anything have to run on a server when somebody visits?

If no, repository hosting is sufficient and will keep working with no attention for years.

If yes, a form that submits somewhere, an API key that cannot be in the page, content assembled per visitor, you need the platform, and that is the reason rather than any feature comparison.

A decision path from finished page through build step to server-side code.
A decision path from finished page through build step to server-side code.

The first-publish confusion

Repository hosting takes several minutes to appear the first time, and nothing announces it.

People push, load the address, see an error page, and conclude it failed. It was building. Wait five minutes before investigating anything, which is advice nobody gives and everybody needs once.

The case neither covers

Both assume a repository.

If the thing being published is a brochure, a price list or a one-page site maintained by somebody who does not write code, a repository is machinery wrapped around a document. Every correction becomes a commit, and corrections stop happening.

Publish it directly at an address instead. The same page, the same custom domain, and nothing in between the person and the edit.

For the surrounding ground, see Comparing two free static hosts and Choosing a GitHub Pages alternative.

Put it at an address

Check whether anything needs building, check whether anything runs on a server, expect the first publish to take minutes, add the domain record once, and skip both when there is no repository to justify.

Questions people ask

Is repository hosting enough for one page?

For a static page, yes. It serves files, supports a custom domain, and has been doing so reliably for years.

What does a deployment platform add?

Automatic builds, a preview address for every branch, server-side functions and analytics. All useful on an application and unused on a finished page.

Which is faster to publish?

Roughly equal for a first push. Repository hosting takes a few minutes to appear the first time, which surprises people into thinking it failed.

What about a custom domain?

Both support one at no cost. Both need a record added at your registrar, which is the step most people find fiddly.

What if I am not a developer?

Neither is the right tool. Both assume a repository, and maintaining one for a single page is machinery around a document.

Keep reading