Deploy to GitHub Pages
Deploy your ciderpress documentation site to GitHub Pages using a GitHub Actions workflow.
This guide covers user/organization Pages served at the root. Project Pages at https://<user>.github.io/<repo>/ are not yet supported — ciderpress has no base config field. Track via GitHub issue if you need this.
Prerequisites
- A GitHub repository with your ciderpress project
- ciderpress building locally (
npx ciderpress buildsucceeds) - A committed lockfile (
pnpm-lock.yamlorpackage-lock.json) —--frozen-lockfile/npm cifail without one - Repository admin access (to enable GitHub Pages)
Steps
Replace pnpm with your preferred package manager (npm, yarn, etc.) in all commands below.
1. Add output directories to gitignore
Add the ciderpress output root to .gitignore — its contents are regenerated by sync and build:
2. Create the GitHub Actions workflow
Create .github/workflows/deploy-docs.yml:
If you use npm instead of pnpm, replace the pnpm-specific steps:
3. Enable GitHub Pages
- Go to your repository Settings > Pages
- Under Source, select GitHub Actions
4. Push to main
Push your changes to the main branch to trigger the first deployment.
Verification
After the workflow completes, open the URL shown in the GitHub Actions deployment step output. You should see your documentation site with all pages, navigation, and search working.
Check the workflow status at Actions > Deploy Docs in your repository.
Troubleshooting
Workflow fails at deploy step
Symptom: The build job succeeds but the deploy job fails with a permissions error.
Fix: Ensure GitHub Pages source is set to GitHub Actions (not "Deploy from a branch") in Settings > Pages.
404 on subpaths
Symptom: The home page loads but navigating to other pages returns 404.
Cause: GitHub Pages does not support client-side routing by default.
Fix: ciderpress builds to static HTML with one file per route, so this should not happen. If it does, verify that .ciderpress/dist contains individual .html files for each page.
Custom domain
To use a custom domain, add a step to the build job (after the ciderpress build step, before the upload-pages-artifact step) that writes a CNAME file:
Then configure your DNS to point to GitHub Pages. See the GitHub Pages custom domain docs for full DNS setup instructions.
References
- CLI reference — build
- CLI reference — sync
- Content — how pages and sections are defined