Friday, January 10, 2025

Host a Website In Github

 

 

Q) Why should we use GitHub for hosting?

A) Whether you're in the IT profession or any other field, having your own portfolio is essential—think of it as an E-Resume. It provides HR professionals and interviewers with easy access to your work, showcasing your skills and projects in a more dynamic and accessible way.

Example Link: [Click Here]

Step 1) Create a Public Repository Named username.github.io

  • Name the repository exactly as your GitHub username followed by .github.io (e.g., subhashsautiyal.github.io)


Step 2) Clone the repository:

  • git clone github.com/username/username.github.io.git

Remember: Add Your System SSH Key in Github First. 


Step 3) Place your website files (HTML, CSS, JavaScript, etc.) in the cloned repository folder.


Step 4) Commit and push the changes:

  • cd username.github.io
  • git add .
  • git commit -m "Initial website files"
  • git push origin main


Step 5) Enable GitHub Pages

  • Go to the Settings of the username.github.io repository.
  • Scroll down to the Pages section.
  • Ensure the source branch is set to main and click Save.
  • Your site will be hosted at https://username.github.io.


Related Article 😱


No comments:

Post a Comment

testing