Skip to content

GitHub Pages

Publish a static project site from a GitHub repository. Check whether your site can run from prepared files and whether GitHub’s usage rules fit what you plan to host.

Visit GitHub Pages

Can GitHub Pages run the site you have?

GitHub Pages publishes HTML, CSS and JavaScript files from GitHub. A visitor’s browser can run the JavaScript. If the project needs server code to verify a login or save a reservation, Pages does not run that server.

A project manual, portfolio or small demo can fit. GitHub says Pages may not be used as free hosting to run an online business, an e-commerce site or a site primarily for commercial transactions or commercial SaaS. GitHub also says to avoid sensitive transactions on Pages.

How do you check a first release before sharing it?

Start with a new disposable repository for a fictional project manual. Keep personal information, secrets and live service connections out of the files. Check what will be public before pushing or enabling Pages. A private repository does not by itself make a Pages site private.

<!doctype html>
<html lang="en">
  <meta charset="utf-8">
  <title>Project handbook</title>
  <h1>Project handbook</h1>
  <p>Example release one.</p>
</html>
  1. Make one recognizable page
    Create index.html with the sample below. Open it locally and check for Project handbook and Example release one.
  2. Check what would publish
    For a plain site, select Deploy from a branch in the repository’s Pages settings. Choose the branch and either its root or docs folder. Put lowercase index.html at the top of that folder. If you use a build tool, check which prepared files its workflow publishes.
  3. Verify the published address
    If you choose to publish the sample, open the Pages address while signed out. Look for Example release one. After a later change, check the live address for the new text before sharing it.

What do you need to budget for?

GitHub Free includes Pages for public repositories. Eligible paid plans can publish from private repositories, but that setting does not make the site private. GitHub documents private Pages access for eligible Enterprise Cloud organization project sites from private or internal repositories.

GitHub lists a 1 GB published site limit and a soft bandwidth limit of 100 GB per month. For a custom address, use a domain you already control or budget for registration. If the site needs more space or a server, budget for another service.

What can you take to another host?

Keep the repository with the page files and any instructions used to turn source into published files. If you use your own address, keep access to the account that controls it.

Before changing the domain, serve the same files at a test address on the new host. Check links, images and nested pages from a signed-out browser. If another service powers a form or supplies data, verify its test connections separately.