GitHub Pages Setup Guide
This guide explains how to set up GitHub Pages for this Jekyll documentation site.
Prerequisites
- Repository hosted on GitHub
- Admin access to the repository
Setup Steps
1. Enable GitHub Pages
- Go to your repository on GitHub
- Click on Settings tab
- In the left sidebar, click on Pages
- Under Build and deployment:
- Source: Select “GitHub Actions”
- Click Save
2. Configure Repository Permissions
The GitHub Actions workflow needs specific permissions to deploy to GitHub Pages.
- Go to Settings → Actions → General
- Scroll down to Workflow permissions
- Select Read and write permissions
- Check Allow GitHub Actions to create and approve pull requests
- Click Save
3. Verify Configuration
The repository already includes:
.github/workflows/docs.yml- GitHub Actions workflowdocs/_config.yml- Jekyll configurationdocs/Gemfile- Ruby dependencies
4. Deploy
Push changes to the main branch:
git add .
git commit -m "docs: setup Jekyll with Just the Docs theme"
git push origin main
The GitHub Actions workflow will automatically:
- Build the Jekyll site
- Deploy to GitHub Pages
5. Check Deployment Status
- Go to the Actions tab in your repository
- Check the “Deploy Documentation” workflow
- Wait for the workflow to complete (usually 1-2 minutes)
6. Access Your Documentation
Once deployed, your documentation will be available at:
https://[username].github.io/[repository-name]/
For this repository:
https://ahmed-bhs.github.io/hexagonal-maker-bundle/
Workflow Details
The GitHub Actions workflow (.github/workflows/docs.yml) is triggered:
- On every push to
mainbranch that modifies files indocs/ - Manually via the Actions tab
Workflow Steps
- Checkout: Clones the repository
- Setup Ruby: Installs Ruby and dependencies
- Setup Pages: Configures GitHub Pages
- Build with Jekyll: Builds the static site
- Upload artifact: Uploads the built site
- Deploy: Deploys to GitHub Pages
Troubleshooting
Workflow Fails with Permission Error
Error: Error: HttpError: Resource not accessible by integration
Solution: Enable workflow permissions (see Step 2 above)
Site Not Updating
- Check the Actions tab for failed workflows
- Clear browser cache
- Wait a few minutes for CDN to update
Ruby/Bundle Errors
The workflow uses:
- Ruby 3.1
- Bundler cache for faster builds
If you get dependency errors, check docs/Gemfile is up to date.
Base URL Issues
The _config.yml has:
baseurl: "/hexagonal-maker-bundle"
url: "https://ahmed-bhs.github.io"
Make sure these match your repository settings.
Updating the Documentation
Making Changes
- Edit markdown files in
docs/ - Commit and push to
mainbranch - Workflow automatically deploys changes
Testing Locally
See docs/README.md for local development instructions.
Adding New Pages
- Create
.mdfile in appropriate directory - Add YAML front matter:
--- layout: default title: Page Title parent: Parent Page nav_order: 1 --- - Commit and push
Configuration Files
_config.yml
Main Jekyll configuration:
- Site metadata
- Theme settings
- Navigation
- Search configuration
Gemfile
Ruby dependencies:
github-pagesgemjust-the-docstheme- Jekyll plugins
.github/workflows/docs.yml
GitHub Actions workflow for automated deployment.
Resources
Support
For issues with:
- Jekyll/Theme: Check Just the Docs issues
- GitHub Pages: Check GitHub Pages status
- This documentation: Open an issue in this repository