Skip to content

chore(workflow): add workflow to deploy documentation as github pages#98

Closed
jonperron wants to merge 1 commit into
mainfrom
feat/deloy_documentation
Closed

chore(workflow): add workflow to deploy documentation as github pages#98
jonperron wants to merge 1 commit into
mainfrom
feat/deloy_documentation

Conversation

@jonperron

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new GitHub Actions workflow to automatically build Sphinx documentation and deploy it to GitHub Pages. The workflow builds documentation on push, pull requests, and manual triggers, but only deploys to GitHub Pages when pushing to the main branch.

Key Changes:

  • New workflow file that installs Sphinx dependencies, builds documentation, and deploys to GitHub Pages
  • Uses Python 3.10 with Sphinx, sphinx_rtd_theme, and myst_parser
  • Conditional deployment only on main branch pushes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5

Copilot AI Nov 11, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent action version usage across workflows. Other workflows in the repository (tests.yaml and pre-commit_ci.yaml) use actions/setup-python@v4. Consider using v4 for consistency, or update all workflows to v5.

Suggested change
- uses: actions/setup-python@v5
- uses: actions/setup-python@v4

Copilot uses AI. Check for mistakes.
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'

Copilot AI Nov 11, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing pip upgrade before installing dependencies. Other workflows in the repository upgrade pip first with 'python -m pip install --upgrade pip'. This ensures the latest pip version is used and avoids potential compatibility issues.

Suggested change
python-version: '3.10'
python-version: '3.10'
- name: Upgrade pip
run: python -m pip install --upgrade pip

Copilot uses AI. Check for mistakes.
python-version: '3.10'
- name: Install dependencies
run: |
pip install sphinx sphinx_rtd_theme myst_parser

Copilot AI Nov 11, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dependencies are installed without version constraints. Consider pinning versions (e.g., 'sphinx<8', 'sphinx_rtd_theme<3', 'myst_parser<3') to ensure reproducible builds and prevent breaking changes from future dependency updates.

Suggested change
pip install sphinx sphinx_rtd_theme myst_parser
pip install 'sphinx<8' 'sphinx_rtd_theme<3' 'myst_parser<3'

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,29 @@
name: Deploy Documentation

on: [push, pull_request, workflow_dispatch]

Copilot AI Nov 11, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow triggers on all push and pull_request events but only deploys on main branch pushes (line 24). This causes unnecessary workflow runs and resource usage for builds that won't be deployed. Consider triggering on 'push: branches: [main]' and 'workflow_dispatch' only, or add a conditional check earlier in the job.

Suggested change
on: [push, pull_request, workflow_dispatch]
on:
push:
branches:
- main
workflow_dispatch:

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants