Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation build workflow #551

Merged
merged 6 commits into from
Mar 23, 2023
Merged

Add documentation build workflow #551

merged 6 commits into from
Mar 23, 2023

Conversation

mdickinson
Copy link
Member

@mdickinson mdickinson commented Mar 22, 2023

This PR adds a documentation build test workflow - the intent is to catch PRs that cause the documentation to be unbuildable for some reason.

Partly motivated by the fact that #513 broke the documentation build and we didn't notice, but it's good to have this anyway.

Closes #552

@mdickinson mdickinson added this to the Release 7.0 milestone Mar 22, 2023
@mdickinson mdickinson removed this from the Release 7.0 milestone Mar 23, 2023
Copy link
Contributor

@corranwebster corranwebster left a comment

Choose a reason for hiding this comment

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

Looks good, one comment.

- run: python -m pip install .
- run: |
python -m sphinx.ext.apidoc --separate --no-toc -o docs/source/api -t docs/source/api/templates envisage */tests
python -m sphinx -b html docs/source docs/build
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we bundle the html into an artefact so it can be manually checked for correctness if needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, that's a good idea. May require some experimentation. I'll see what I can do.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done in 31b2c8c

I've tweaked the Sphinx build command to move the doctrees (which we don't need) out of the build directory, and make the build directory build/html rather than plain old build.

Let's see if the built artifact is useful.
Potentially, this could be the first step in an automated build-docs-at-release-time workflow.

Copy link
Member Author

Choose a reason for hiding this comment

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

Build artifact seems to be working. I'd be a bit happier if the .zip file gave something with an html top-level directory. I've just pushed a change that might just make that happen.

@mdickinson mdickinson merged commit 4c5ccb2 into main Mar 23, 2023
@mdickinson mdickinson deleted the add-doc-build-workflow branch March 23, 2023 14:36
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.

Add automated documentation build
2 participants