codex-lv2-may-2025

Navigation

1 | 2 | 3 | 4 | Current Level: 5 | 6 | 7 | 8 | 9


Lesson: Publishing with GitHub Pages (Classic)

Objective:

Learn how to publish your index.html file as a live website using GitHub Pages (Classic).

Prerequisite:

You should have a repository with an index.html file committed to the main branch.

Steps:

  1. Go to Your Repository Settings

    • Navigate to your repository.
    • Click the “Settings” tab near the top right of the page.
  2. Scroll to the GitHub Pages Section

    • Scroll down until you see the “Pages” section under “Code and automation”.
  3. Configure GitHub Pages (Classic)

    • Under Source, choose Deploy from a branch.
    • In the dropdown menu, select:

      • Branch: main
      • Folder: / (root)
    • Click Save.
  4. Wait for Deployment

    • After saving, GitHub will display a link to your live website.
    • It can take up to 5 minutes for the link to appear. If it takes too long, feel free to come back to this later.
    • The link will look something like:

      https://yourusername.github.io/your-repo-name

  5. Test Your Website

    • Click the link to view your index.html live online.

Practice Activity: