Professional Business Website · Phase 6 · Lesson 1 of 3
Publishing the Site on GitHub Pages
Publish the repository as a live website with GitHub Pages, check it on phones, and understand how a custom domain would be connected later.
What you need
A computer (Windows, macOS or Linux) with Visual Studio Code (free) and a current web browser such as Chrome or Firefox. A smartphone is used for testing. Git and the project's GitHub repository.
In this lesson you will
- Publish a static site with GitHub Pages
- Verify the live site and explain custom domains
Key concepts
GitHub Pagesdeploymentlive URLcustom domainHTTPScache
The lesson
GitHub Pages publishes a repository's files as a website, free for public repositories. In the repository settings, choose the branch and folder to publish from; after a short wait, the site is live at a github.io address with HTTPS.
Test the live address on phones. Problems that did not appear locally are usually file-name case or wrong relative paths; the worked troubleshooting example walks through them.
A custom domain (such as amanitailoring.com) is bought from a domain registrar by the owner, in the owner's name, and connected through DNS settings. Explain the yearly cost and ownership to the client; do not register it in your own name.
Step by step
- Push the final version to GitHub.
- Enable GitHub Pages in the repository settings and wait for the live address.
- Open every page on the live site on two phones.
- Fix any path or file-name problems, push again and re-test.
My page or image does not show on the live site
A step-by-step path for the most common GitHub Pages publishing problems.
- YesIs GitHub Pages enabled in the repository settings with the correct branch and folder?
- YesWait a few minutes and reload; check that index.html is in the published folder's root (not inside a subfolder).
- NoEnable GitHub Pages, choose the branch and folder that contain index.html, save and wait for the live address.
- Yes
- NoDoes the missing file's name match the link exactly, including capital letters?
- YesIs the path relative to the page (for example images/logo.webp, not C:/Users/...)?
- YesClear the browser cache or open a private window; if it still fails, ask your instructor to check the repository with you.
- NoReplace absolute computer paths with relative paths, commit and push, then re-test.
- Yes
- NoRename the file or fix the link so the case matches exactly (Logo.png and logo.png are different files on the server), commit and push.
- Yes
Notes
Most deployment problems are file names and paths. Fix them in the repository, never by editing files on the server.
Practice activity
Publish the site, test every page live, and write a one-paragraph explanation of custom domains for the owner.
Expected result: A live HTTPS site where every page and link works on phones, and a clear custom-domain note for the owner.
Common mistakes
- Registering the client's domain in the developer's own name
- Assuming the site works without testing the live address on a phone
Check your understanding
-
Why might images work locally but not on GitHub Pages?
Show answer
File-name case or relative path differences, which the live server treats strictly.
-
In whose name should a custom domain be registered?
Show answer
The business owner's.
Further learning
Projects are instructor-guided: an instructor sets milestones, checks your work and gives feedback, online or in person. Self-study of the public lessons does not lead to a certificate. Enrolment and fees follow the Academy's existing policies — contact the Academy.