An open API service indexing awesome lists of open source software.

https://github.com/seanmcp/tutorial-deploy-gh-pages

Tutorial to deploy a static site to GitHub Pages
https://github.com/seanmcp/tutorial-deploy-gh-pages

github github-pages hosting how-to static-site tutorial

Last synced: 12 months ago
JSON representation

Tutorial to deploy a static site to GitHub Pages

Awesome Lists containing this project

README

          

# Tutorial: How to deploy to GitHub Pages

Tutorial to deploy a static site to GitHub Pages

## Step 1: Create/go to a repo

GitHub Pages is a great hosting option for static web pages. Create a repo with some HTML, CSS, and JS or navigate to another that you wish to deploy. For the purpose of this tutorial, I'm going to use this repo: `seanmcp/tutorial-deploy-gh-pages`.

## Step 2: Go to "Settings"

Click on "Settings" to the far-right of your repo's tab menu.

![Click "Settings"](/images/go-to-settings.png)

Then scroll down to the "GitHub Pages" section.

![GitHub Pages settings](/images/find-gh-pages.png)

## Step 3: Select your source

GitHub Pages can be deployed from any branch on your repo. For the purpose of this tutorial, we'll be using the `master` branch, but it is also common to use a dedicated `gh-pages` branch.

Select your branch you want to deploy from the dropdown.

![Select the branch you want to deploy](/images/select-branch.png)

Finally, click "Save".

## Step 4: 🎉 Celebrate!

That's it; you're done! You should see a confirmation banner at the top of the screen.

![Confirmation that the branch has been set](/images/confirmation.png)

Your repo should be up and running at `https://.github.io/`.

In our case, [https://seanmcp.github.io/tutorial-deploy-gh-pages](https://seanmcp.github.io/tutorial-deploy-gh-pages).