# Appendix W: Publishing with GitHub Pages > > **Listen to Episode 33:** [Publishing with GitHub Pages](../PODCASTS.md) - a conversational audio overview of this chapter. Listen before reading to preview the concepts, or after to reinforce what you learned. > **Reference companion to:** [Chapter 08: Open Source Culture](08-open-source-culture.md) | Also relevant: [Chapter 21](21-next-steps.md) > > **Authoritative source:** [GitHub Docs: About Pages](https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages) ## How to Deploy a Static Website Directly from Your Repository > GitHub Pages lets you publish a static website straight from a GitHub repository - no server, no hosting bill, no deployment pipeline required for simple sites. This appendix explains how to enable it, what it can publish, and how to ensure the published site meets the same accessibility standards as your source code. ### Learning Cards: GitHub Pages Overview
Screen reader users - The Pages settings are under Settings (gear icon in repository navigation) then "Pages" in the left sidebar under the "Code and automation" group heading - Branch and folder selectors in the Pages settings are standard `select` elements -- navigate with arrow keys to choose your publishing source - After deployment, the published URL appears as a link at the top of the Pages settings page
Low vision users - GitHub Pages settings use the same layout as other repository settings -- look for the "Pages" link in the left sidebar after clicking Settings - The deployment status indicator shows a green checkmark for successful deployments and a red X for failures - Published sites inherit no special styling from GitHub -- ensure your site's CSS provides adequate contrast and font sizing
Sighted users - Find Pages settings via the repository's Settings tab, then "Pages" in the left sidebar under "Code and automation" - The publishing source selector lets you choose a branch and folder (`/` root or `/docs`) -- select your combination and click Save - After a successful deployment, a green banner with your site URL appears at the top of the Pages settings
## Table of Contents 1. [What GitHub Pages Is](#1-what-github-pages-is) 2. [Enabling GitHub Pages for a Repository](#2-enabling-github-pages-for-a-repository) 3. [Publishing Sources](#3-publishing-sources) 4. [The html/ Folder in This Project](#4-the-html-folder-in-this-project) 5. [Custom Domains](#5-custom-domains) 6. [HTTPS and Security](#6-https-and-security) 7. [Accessibility Considerations for Published Sites](#7-accessibility-considerations-for-published-sites) 8. [GitHub Actions and Continuous Deployment](#8-github-actions-and-continuous-deployment) 9. [Limitations](#9-limitations) 10. [Troubleshooting](#10-troubleshooting) ## 1. What GitHub Pages Is GitHub Pages is a static site hosting service built into GitHub. It serves files directly from a branch or folder in your repository at a URL of the form: ```text https://.github.io// ``` For organization accounts and user profile repositories (`/.github.io`), the URL becomes: ```text https://.github.io/ ``` **What "static" means:** GitHub Pages only serves files as-is - HTML, CSS, JavaScript, images, PDFs. It does not run server-side code (no PHP, no Python, no Node.js request handlers). If you need a database or dynamic server logic, you need a different host. ### What it is good for - Documentation sites - Workshop materials (like this project) - Project landing pages - Personal portfolios - Simple blogs via Jekyll ## 2. Enabling GitHub Pages for a Repository ### Step-by-step (GitHub.com) 1. Go to the repository on GitHub.com 2. Click **Settings** (the gear icon in the top navigation) 3. In the left sidebar, scroll to **Code and automation** and click **Pages** 4. Under **Build and deployment**, choose your publishing source: - **Deploy from a branch** - serve files directly from a branch/folder - **GitHub Actions** - use a workflow to build and deploy 5. If using "Deploy from a branch": - Select the branch (e.g. `main` or `master`) - Select the folder: `/` (root) or `/docs` 6. Click **Save** GitHub will build and deploy within a minute or two. The URL appears at the top of the Pages settings once the first deployment succeeds. ### Screen reader navigation for the Pages settings page - The **Settings** tab is a link in the repository's top navigation bar. It has the accessible name "Settings" - The **Pages** option in the left sidebar is a link under the "Code and automation" group heading - The branch and folder dropdowns are standard `