Follow these steps to deploy your BookShelf documentation to GitHub Pages.
Replace yourusername with your actual GitHub username in these files:
# Quick find all instances
grep -r "yourusername" docs/
# Files to update:
# - docs/_config.yml (url and baseurl)
# - docs/index.md
# - docs/getting-started.md
# - docs/faq.md
# - docs/quick-reference.md
# - docs/user-guide/*.md
# - docs/admin/settings.mdExample changes in docs/_config.yml:
# Before:
url: https://yourusername.github.io
baseurl: /BookShelf
# After (if your username is "ernie"):
url: https://ernie.github.io
baseurl: /BookShelfNote: Also update repository name if it's not "BookShelf"
- Go to your repository on GitHub
- Click Settings (top right)
- In left sidebar, click Pages
- Under "Build and deployment":
- Source: Select GitHub Actions
- Click Save
That's it! No other configuration needed.
Since branches have diverged:
# Pull remote changes first
git pull --rebase origin main
# Or if you prefer merge
git pull origin main# Stage all documentation files
git add docs/ .github/workflows/deploy-docs.yml README.md
# Commit with descriptive message
git commit -m "Add comprehensive user documentation for GitHub Pages"
# Push to main branch
git push origin main- Go to your repository on GitHub
- Click Actions tab (top)
- You should see "Deploy Documentation to GitHub Pages" workflow running
- Click on it to see progress
- Wait for green checkmark (usually 2-3 minutes)
Once deployed, visit:
https://yourusername.github.io/BookShelf/
Replace with your actual username.
If you see "Your branch and origin/main have diverged":
# Pull and merge remote changes
git pull origin main
# Then commit and push your docs
git add docs/ .github/workflows/deploy-docs.yml README.md
git commit -m "Add user documentation for GitHub Pages"
git push origin mainCheck the workflow logs:
- Go to Actions tab
- Click failed workflow
- Review error messages
Common issues:
- Ruby/Bundle errors: Gemfile should install automatically
- Permission errors: Ensure GitHub Actions has write permissions
- Settings → Actions → General → Workflow permissions
- Select "Read and write permissions"
- Save
- 404 errors: Check
baseurlin_config.ymlmatches repo name
Force a rebuild:
- Make a small change to any docs file
- Commit and push
- Or manually trigger workflow:
- Actions tab → Deploy Documentation → Run workflow
- Pulled latest changes from origin/main
- Updated all "yourusername" placeholders
- Updated repository name if different
- Enabled GitHub Pages in settings
- Committed and pushed documentation
- Verified workflow succeeded in Actions tab
- Accessed documentation at GitHub Pages URL
- Tested navigation and search
If you encounter issues:
- Check GitHub Actions logs
- Review Jekyll build output
- Open issue with error details
🎉 Ready to Deploy! Follow the steps above to publish your documentation.