Codetainer LogoCodetainer Acad

Lessons

Lesson 15: Deploying with GitHub Pages

🌐 Lesson 15: Deploying with GitHub Pages

GitHub Pages is a free hosting service that lets you deploy static websites directly from a GitHub repository. It's perfect for portfolios, documentation, or simple apps.

πŸ“¦ Step-by-Step: Deploy a Static Site

  1. Push your code to the main branch of your GitHub repository.
  2. Go to your repository on GitHub, then navigate to Settings β†’ Pages.
  3. Under "Source", select main branch and set the folder to / (root).
  4. Click Save. GitHub will generate a deployment link like:
    https://your-username.github.io/your-repo-name

⚠️ Important:

  • Your entry point file must be named index.html β€” GitHub looks for this file to render your site.
  • It may take a few minutes for your site to go live after saving the settings.

πŸ’‘ Pro Tips

  • Add a CNAME file to connect a custom domain.
  • Use GitHub Actions for auto-deployment of build tools like React, Vue, or Svelte.
  • Keep your site lightweight β€” Pages only supports static content (no backend).

Now you've got your first static site LIVE on the web β€” no server setup, no money down, just raw HTML glory!

CodetainerAcad