Skip to main content

Command Palette

Search for a command to run...

Publish project as a webpage on GitHub Pages

Updated
2 min read
Publish project as a webpage on GitHub Pages
M

Mohamad's interest is in Programming (Mobile, Web, Database and Machine Learning). He is studying at the Center For Artificial Intelligence Technology (CAIT), Universiti Kebangsaan Malaysia (UKM).

To publish your project as a webpage on GitHub Pages (using GitHub.io), follow these steps:

Step 1: Ensure Your Repository is Set Up

  • Make sure your repository contains an index.html file, as this will be the entry point for your webpage.

Step 2: Go to Repository Settings

  1. Navigate to your repository on GitHub.

  2. Click on the "Settings" tab at the top of the page.

Step 3: Locate GitHub Pages Section

  1. Scroll down to the "Pages" section on the left sidebar (or look for the "Code and automation" section).

  2. Under the "Source" section, you will see a dropdown menu.

Step 4: Choose the Source Branch

  1. Select the branch you want to use for GitHub Pages (usually main or master).

  2. Choose the root folder (/), unless you have a specific folder (like /docs) where your index.html is located.

Step 5: Save Your Changes

  • Click the "Save" button. GitHub will then build your site.

Wait for next stage:

Wait for next stage:

Step 6: Access Your Published Page

  • After a few moments, GitHub will provide a link to your published page. It will typically be in the format:

      https://smartcomputing123.github.io/TheTimeTraveler/
    
  • Navigate to that link to see your published webpage.

Step 7: Update Your Page

  • Whenever you make updates to your repository, just commit and push those changes. The GitHub Pages site will automatically update with the latest changes.

Additional Tips

  • If you're using custom domains or want to adjust settings further, explore the options provided in the GitHub Pages settings.

  • Be sure to test your webpage to ensure everything displays correctly.

28 views