/github-for-non-tech

How to publish a project using GitHub Pages?

Publish your project with GitHub Pages in simple steps: create a repo, clone locally, add files, commit & push changes, enable Pages, and set up a custom domain.

Matt Graham, CEO of Rapid Developers

Book a call with an Expert

Starting a new venture? Need to upgrade your web app? RapidDev builds application with your growth in mind.

Book a free No-Code consultation

How to publish a project using GitHub Pages?

 
Step 1: Create a GitHub repository
 

  • Open your browser and go to github.com. Log in to your account.
  • Click the New button (usually at the top-left of the page) to create a new repository.
  • Enter a Repository name, for example my-project. This will serve as the URL slug.
  • Optionally add a description, choose Public visibility, and initialize with a README if you like.
  • Click Create repository.

 
Step 2: Clone the repository locally
 

  • On your repository page, click the green Code button and copy the HTTPS URL.
  • Open a terminal or command prompt on your computer.
git clone https://github.com/your-username/my-project.git
cd my-project

 
Step 3: Add your project files
 

  • Create an index.html file (or a docs folder containing index.html). This will be the entry point of your site.
  • Open index.html in your code editor and add your HTML content. For example:
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>My Project</title>
</head>
<body>
  <h1>Hello, GitHub Pages!</h1>
  <p>This is my awesome project.</p>
</body>
</html>

 
Step 4: Commit and push your changes
 

  • Stage your changes, commit them, and push to GitHub:
git add .
git commit -m "Initial commit of GitHub Pages site"
git push origin main
  • Replace main with master if your default branch is named differently.

 
Step 5: Enable GitHub Pages in repository settings
 

  • On your repository page, click the Settings tab.
  • Scroll down to the Pages section in the sidebar (under “Code and automation”).
  • Under Source, select the branch you pushed to (e.g., main) and choose / (root) or /docs folder if you placed files there.
  • Click Save.
  • GitHub will show a confirmation and the URL where your site is published, typically:
https://your-username.github.io/my-project/

 
Step 6: Verify your live site
 

  • Wait a few moments for GitHub to build and deploy your site.
  • Visit the provided URL in your browser to see your project live.

 
Step 7: Update and maintain your site
 

  • To make changes, update files locally, commit, and push again:
git add .
git commit -m "Update content"
git push origin main
  • GitHub Pages will automatically rebuild and publish your site with each push.

 
Bonus: Using a custom domain
 

  • In the Pages settings, under Custom domain, enter your domain name (e.g., www.example.com).
  • Follow the instructions to add the required CNAME or A records to your DNS provider.
  • Push a CNAME file to the root of your repository containing your domain name:
echo "www.example.com" > CNAME
git add CNAME
git commit -m "Add custom domain"
git push origin main
  • Your site will be available at your custom domain once DNS propagates.

Want to explore opportunities to work with us?

Connect with our team to unlock the full potential of no-code solutions with a no-commitment consultation!

Book a Free Consultation

Client trust and success are our top priorities

When it comes to serving you, we sweat the little things. That’s why our work makes a big impact.

Rapid Dev was an exceptional project management organization and the best development collaborators I've had the pleasure of working with. They do complex work on extremely fast timelines and effectively manage the testing and pre-launch process to deliver the best possible product. I'm extremely impressed with their execution ability.

CPO, Praction - Arkady Sokolov

May 2, 2023

Working with Matt was comparable to having another co-founder on the team, but without the commitment or cost. He has a strategic mindset and willing to change the scope of the project in real time based on the needs of the client. A true strategic thought partner!

Co-Founder, Arc - Donald Muir

Dec 27, 2022

Rapid Dev are 10/10, excellent communicators - the best I've ever encountered in the tech dev space. They always go the extra mile, they genuinely care, they respond quickly, they're flexible, adaptable and their enthusiasm is amazing.

Co-CEO, Grantify - Mat Westergreen-Thorne

Oct 15, 2022

Rapid Dev is an excellent developer for no-code and low-code solutions.
We’ve had great success since launching the platform in November 2023. In a few months, we’ve gained over 1,000 new active users. We’ve also secured several dozen bookings on the platform and seen about 70% new user month-over-month growth since the launch.

Co-Founder, Church Real Estate Marketplace - Emmanuel Brown

May 1, 2024 

Matt’s dedication to executing our vision and his commitment to the project deadline were impressive. 
This was such a specific project, and Matt really delivered. We worked with a really fast turnaround, and he always delivered. The site was a perfect prop for us!

Production Manager, Media Production Company - Samantha Fekete

Sep 23, 2022