How to Deploy Your Personal Website Using GitHub Pages

Prerequisites

  1. Create a New GitHub Account

    • If you don't already have a GitHub account, go to github.com and sign up for a new account.
  2. Add a New Repository

    • After creating your account, log in and click on the “New” button to create a new repository.
    • Give your repository a name, make sure it is public, and then click “Create repository.”
  3. Upload Your HTML Page to the Repository

    • Once the repository is created, you’ll be taken to its main page. Click the “Add file” button, then “Upload files.”
    • Select your HTML file (e.g., index.html) from your computer and upload it. Make sure the file is named index.html as this will be the default page for your site.
    • Commit the changes to the repository.
  4. Deploy Your Website

    • Go to the “Settings” tab of your repository.
    • Scroll down to the “GitHub Pages” section.
    • Under “Source,” select the branch that contains your HTML file (usually main or master), then click “Save.”
    • After a few moments, you’ll see a message with the URL where your site is published (it will be something like https://yourusername.github.io/your-repository-name).

By following these steps, you will have successfully deployed your personal website using GitHub Pages. Happy coding!