feat(ci): add documentation preview and GitHub Pages workflows#3
feat(ci): add documentation preview and GitHub Pages workflows#3JacobCoffee merged 3 commits intomainfrom
Conversation
- Add docs.yml for building docs on PR/push with PR preview comments - Add pages-deploy.yml for GitHub Pages deployment from gh-pages branch - Triggers on docs/ and src/ changes (source affects autodoc) - Uses rossjrw/pr-preview-action for PR preview links 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR adds GitHub Actions workflows for building and deploying Sphinx documentation with PR preview capabilities. The implementation introduces two workflows: docs.yml for building documentation on PRs and pushes to main, and pages-deploy.yml for deploying from a gh-pages branch. The PR implements smart path filtering to build only when docs or source code changes.
- Adds automated documentation building with Sphinx using uv for dependency management
- Implements PR preview functionality via rossjrw/pr-preview-action for documentation changes
- Sets up GitHub Pages deployment infrastructure with two separate workflows
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| .github/workflows/docs.yml | Main documentation workflow with build job, path filtering, PR previews, and GitHub Pages deployment from main branch |
| .github/workflows/pages-deploy.yml | Separate workflow to deploy from gh-pages branch to GitHub Pages |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Autosummary needs to import all modules to generate API docs, which requires litestar and sqlalchemy optional dependencies. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Upload artifact for GitHub Pages | ||
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
| uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1 | ||
| with: | ||
| path: docs/_build/html |
There was a problem hiding this comment.
Missing actions/configure-pages step before uploading the Pages artifact. The configure-pages action must be called before upload-pages-artifact to properly set up the Pages environment. Add this step before line 72: - name: Setup Pages\n uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
Summary
docs.ymlworkflow for building documentation on PRs and pushes to mainpages-deploy.ymlworkflow for GitHub Pages deployment from gh-pages branchrossjrw/pr-preview-actionwhen docs or src changesSetup Required
After merging, enable GitHub Pages in repo settings:
Test plan
🤖 Generated with Claude Code