Skip to content

Instantly share code, notes, and snippets.

@codeadamca
Last active March 5, 2023 13:26
Show Gist options
  • Save codeadamca/e49d11f9b832262f034628c3deb15106 to your computer and use it in GitHub Desktop.
Save codeadamca/e49d11f9b832262f034628c3deb15106 to your computer and use it in GitHub Desktop.
Deploying a Static Page to GitHub Pages

Deploying a Static Page to GitHub Pages

You can host your GitHub repositories using GitHub Pages. This tool only allows hsoting of clients side languages such as HTML, CSS, and JavaScript.

To deploy a GitHub repository follow these steps:

  1. Navigate to the GitHUb repository that you would like to deploy.
  2. Click Settings (top right).
  3. Click Pages (left side).
  4. Choose Deploy from a branch, then select the branch (probably main), and then the folder (probably / (root)).

GitHub Pages Settings

Your HTML, CSS, and JavaScript webpage will now be available at:

https://<GITHUB_USERNAME>.github.io/<GITHUB_REPO_NAME>

For example my github-pages repository is avalable to view as a webpage at https://codeadamca.github.io/github-pages/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment