blog github-pages

This article is about a way to publish a Website Using GitHub Pages.

What is GitHub Pages?

GitHub Pages is a service that automatically publishes static websites from GitHub repositories.
You can build a website using files written in HTML or Markdown.

For instructions on creating a site using Jekyll, please refer to this article.

Workflow to Create a Website

  1. Create a GitHub account
  2. Create a GitHub repository
  3. Configure repository settings
  4. Check if the site is published
  5. Visit your site

1. Create a GitHub Account

If you don’t have a GitHub account, create one by following the steps below:

  1. Go to GitHub.
  2. Click “Sign up”.
    GitHub Sign Up Button
  3. Follow the instructions to create your account.

2. Create a GitHub Repository

  1. After signing in, go to the new repository page.
    New Repository Button
  2. Configure the following settings:

    Item Description
    Owner Choose your GitHub account.
    Repository name Set the name as yourusername.github.io (all lowercase).
    Description Optional description for the repository.
    Repository visibility Choose “Public” (required for free accounts).
    Add a README file Check this option to add a README.md. This file, along with index.html or index.md, can serve as the homepage.
  3. Click Create repository.
    Create Repository Button

3. Configure Repository Settings

  1. Go to the repository you created.
    Repository Page
  2. Click Settings from the top menu.
    Settings Button
  3. In the left sidebar, click Pages.
    Pages Menu
  4. Under Build and deployment, set the following:

    Item Description
    Source Select “Deploy from a branch”.
    Branch Choose the main branch and root folder /.
  5. Click Save.

4. Check if the Site is Published

  1. Open the Actions tab in your repository.
    Actions Tab
  2. If a green check mark appears next to an action, the deployment has completed successfully.
    Action Status

5. Visit Your Site

  1. In the repository, go to SettingsPages.
    Settings
    Pages Menu
  2. Click the Visit site button.
    Visit Site Button
    Your homepage (e.g., README.md) should now be visible.
    Homepage Screenshot