Learn to preview your website with GitHub Pages. Follow our step-by-step guide to create a repo, deploy code, and access your live URL seamlessly.
Book a call with an Expert
Starting a new venture? Need to upgrade your web app? RapidDev builds application with your growth in mind.
Step 1: Create a GitHub repository
Start by setting up a new repository where your website files will live.
Step 2: Add your website files locally
Prepare or create the HTML, CSS, JavaScript, and any other assets in a local folder.
cd path/to/your-website
git init
git add .
git commit -m "Initial commit"
git remote add origin https://github.com/username/my-website.git
git branch -M main
git push -u origin main
Step 3: Enable GitHub Pages in the repository settings
Now that your code is on GitHub, tell GitHub to host it.
Step 4: Configure the source branch and folder
Choose which branch and directory GitHub Pages should use.
Step 5: Wait for GitHub Pages to build your site
After saving, GitHub will start the publishing process.
Step 6: Access your live preview URL
Once deployment completes, GitHub Pages provides your site’s address.
https://username.github.io/my-website/
Step 7: Make updates and redeploy automatically
Any commits to the chosen branch will trigger a rebuild.
git add .
git commit -m "Update website content"
git push
Step 8: Troubleshoot common issues
If your site doesn’t appear or shows errors, consider these checks:
/docs
folder.When it comes to serving you, we sweat the little things. That’s why our work makes a big impact.