GitHub Pages

For Webpages

GitHub Pages is not available through GitHub Enterprise! You can follow these instructions with a personal GitHub account.

Here, we’ll specify instructions for using your GitHub repo to host a webpage. Please create a new repo using the instructions above. For this class, we have you name it webpages.

  • Choose the “public” option between public and private
  • Check the option “Add a README file”
  • Lastly click on “Create Repository”
    • at the end of the page.
    • Once clicked,
      • Your repository should be created.
      • You will be directed to your newly created repository named “webpages”
  1. Click on “Settings”
    • Under “Code and automation” you should see “Pages”, click on “Pages”
    • Under “branch”, click on the “None” dropdown, and select “main”, hit “Save” afterwards.
    • Refresh the page after a few seconds, and you should see, "Your site is live at ..."on top of the page with the correct URL.
  2. Click the “Code” tab
  3. For any file you want to add to your webpage, click “Upload file” and choose the file to upload, saving will make the page immediately visible.
    • You must have a file called “index.html” on your webpage, even if it is blank, or the webpages will display the readme instead of your webpage

Once these steps have been completed, your webpage will be viewable at the specified URL.

  • Where webpages is the name of the repository
  • Where filename.html is the name of your HTML file
  • Please note all items are case sensitive.