Skip to content

ci: add GitHub Actions workflow for documentation build and deploy - #286

Closed
santhil-cyber wants to merge 1 commit into
mllam:mainfrom
santhil-cyber:ci/docs-workflow
Closed

ci: add GitHub Actions workflow for documentation build and deploy#286
santhil-cyber wants to merge 1 commit into
mllam:mainfrom
santhil-cyber:ci/docs-workflow

Conversation

@santhil-cyber

Copy link
Copy Markdown
Contributor

Describe your changes

Adds a CI/CD workflow for automated documentation building and deployment. This complements the ongoing documentation efforts in #252 and #272 by providing the infrastructure to automatically verify and deploy docs.

What the workflow does:

  • On PRs to main: builds the Sphinx documentation with -W (warnings as errors) and runs linkcheck to catch broken references early
  • On push to main: builds and deploys to GitHub Pages automatically
  • Path filters: only triggers when docs/, neural_lam/ (for docstring changes), or the workflow file itself changes — avoids unnecessary runs
  • Graphviz: installs the system package so inheritance_diagram and graphviz directives render properly
  • Concurrency control: prevents parallel deployments to Pages

Also includes a minimal docs/requirements.txt with core Sphinx dependencies. This is intentionally lean so it can work with whichever documentation tooling is settled on (Sphinx, Jupyter Book, etc.) — only the install step and build command would need updating.

Issue Link

Relates to #61

Type of change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📖 Documentation (Addition or improvements to documentation)

Checklist before requesting a review

  • My branch is up-to-date with the target branch
  • I have performed a self-review of my code
  • For any new/modified functions/classes I have added docstrings that clearly describe its purpose, expected inputs and returned values
  • I have placed in-line comments to clarify the intent of any hard-to-understand passages of my code
  • I have updated the README to cover introduced code changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have given the PR a name that clearly describes the change, written in imperative form
  • I have requested a reviewer and an assignee

Add a CI/CD workflow that:
- Builds Sphinx documentation on every push and PR to main
- Validates with -W (warnings as errors) and linkcheck
- Deploys to GitHub Pages on merge to main
- Uses path filters to only trigger on docs/ or neural_lam/ changes
- Installs graphviz for inheritance diagram rendering

Also adds docs/requirements.txt with minimal Sphinx dependencies.

Relates to mllam#61
@Mohit-Lakra

Copy link
Copy Markdown
Contributor

hey @santhil-cyber - good work with the CI structure, path filters and concurrency control are good additions. One thing to note is that #272 already includes a GitHub Actions workflow that uses jupyter-book build and deploys to Pages, so if both PRs are merged we'll end up with two workflows that target the same Pages URL and will interfere with each other. The larger problem is that the existing docs/ directory in #272 uses _config.yml and _toc.yml (Jupyter Book format), which won't work with sphinx-build - it should use conf.py instead. If you'd like to contribute to the CI side of things, it might be easiest to modify it to use jupyter-book build and open it against my branch - that way it won't interfere with #272 🙂

@joeloskarsson

Copy link
Copy Markdown
Collaborator

I agree with @Mohit-Lakra for the organization of this, let's try to keep things to #272 for now. You can always suggest changes directly in there until it is merged. Will close this in favor of this workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants