GitHub Pages Setup
Simple guide to enable GitHub Pages for your gem-ci repository documentation.
Quick Setup
1. Enable GitHub Pages
- Go to repository Settings
- Scroll to Pages section
- Under Source, select Deploy from a branch
- Choose Branch:
master
ormain
- Choose Folder:
/ (root)
or/docs
- Click Save
2. Configure Jekyll (if using /docs folder)
The repository already includes docs/_config.yml
:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
title: gem-ci
description: Ruby gem continuous integration workflows
baseurl: "/gem-ci"
url: "https://your-username.github.io"
markdown: kramdown
highlighter: rouge
theme: minima
plugins:
- jekyll-feed
- jekyll-sitemap
exclude:
- Gemfile
- Gemfile.lock
- node_modules
- vendor
3. Update Configuration
Edit docs/_config.yml
with your details:
1
2
3
4
title: Your Gem Name
description: Your gem description
baseurl: "/your-repo-name"
url: "https://your-username.github.io"
4. Access Your Site
After setup, your documentation will be available at:
1
https://your-username.github.io/your-repo-name/
File Structure
The docs folder should look like:
1
2
3
4
5
6
7
8
9
10
11
12
13
docs/
βββ _config.yml # Jekyll configuration
βββ index.md # Homepage
βββ guides/ # User guides
β βββ gitflow.md
β βββ local-testing.md
βββ setup/ # Setup instructions
β βββ secrets.md
β βββ github-pages.md
βββ workflows/ # Workflow documentation
β βββ overview.md
βββ diagrams/ # Workflow diagrams
βββ ci-workflow-overview.md
Custom Domain (Optional)
To use a custom domain:
- Create
docs/CNAME
file with your domain:1
your-domain.com
- Configure DNS with your domain provider:
- Add CNAME record pointing to
your-username.github.io
- Add CNAME record pointing to
- In repository Settings > Pages:
- Enter your custom domain
- Enable βEnforce HTTPSβ
Testing Locally
Install Jekyll to test locally:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Install Jekyll
gem install jekyll bundler
# Navigate to docs folder
cd docs
# Create Gemfile if needed
bundle init
bundle add jekyll
bundle add minima
# Serve locally
bundle exec jekyll serve
# View at http://localhost:4000
Troubleshooting
Site not updating?
- Check Actions tab for build errors
- Wait 5-10 minutes for changes to deploy
- Clear browser cache
404 errors?
- Verify baseurl in
_config.yml
- Check file paths are correct
- Ensure markdown files have proper frontmatter
Build failures?
- Check Jekyll syntax in markdown files
- Verify all includes and layouts exist
- Review GitHub Actions logs
Frontmatter Template
Add to the top of each markdown file:
1
2
3
4
5
---
layout: default
title: Page Title
description: Page description
---
Thatβs it! Your gem-ci documentation will be live on GitHub Pages.