base > docs > publishing > GitHub Pages
This repository is configured to use GitHub Pages to host a simple, clean website for the project.
Before the workflow can deploy your site, you must configure your repository
to use GitHub Actions for GitHub Pages.
This is a one-time setup step that connects your repository's Pages settings
to the pages.yml workflow included in this template.
- Navigate to Repository Settings: Go to the main page of your repository and click on the Settings tab.
- Select Pages: In the left-hand sidebar, click on Pages.
- Set the Deployment Source: Under the "Build and deployment" section, you will see a Source option. Select "GitHub Actions" from the dropdown menu.
After you select "GitHub Actions", the UI may present you with suggestions
for common workflows (e.g., "GitHub Pages Jekyll", "Static HTML").
You can ignore these suggestions.
This repository already contains a custom, pre-configured workflow
(.github/workflows/pages.yml) that will
be used automatically.
Note: If you do not perform this setup step, the
pages.ymlworkflow will fail with a "Get Pages site failed" or "HttpError: Not Found" error.
The site is built and deployed by the
.github/workflows/pages.yml workflow.
Here's a summary of the process:
- Trigger: The workflow runs automatically on every push to the
mainbranch. - Jekyll Build: It uses the standard
jekyll-build-pagesGitHub Action to build a static website. - Homepage: It is configured to use the root
README.mdfile as the content for the homepage (index.html) of the site. - Styling: The
_config.ymlfile in the root of the repository specifies thejekyll-theme-primertheme, which gives the site the standard GitHub look and feel. - Deployment: The built static site is then deployed to GitHub Pages.
After the first push to main, the site will be available at a URL like:
https://<your-username>.github.io/<your-repository-name>/
You can also find the URL in the "Pages" section of your repository's settings.