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 Github Actions workflow to build documentation #993

Merged
merged 2 commits into from
Oct 12, 2022

Conversation

alcaeus
Copy link
Member

@alcaeus alcaeus commented Oct 11, 2022

This PR adds a build step to build documentation. This can be used in lieu of building documentation locally as python 2 is no longer available on many platforms. I was not able to make giza make publish exit with a non-zero exit code, even when using a wrong filename to link to a file. For now this means we'll have to verify the docs build manually, but it's better than not being able to run docs at all. The second commit fixes all current warnings.

The built documentation is uploaded as a build artefact to the Docs workflow, accessible through the actions tab.

@alcaeus alcaeus requested a review from jmikola October 11, 2022 11:32
@alcaeus alcaeus self-assigned this Oct 11, 2022
@@ -14,8 +14,8 @@ Overview
--------

MongoDB stores data records as BSON documents. BSON is a binary representation
of :term:`JSON` documents, though it contains more data types than JSON. For the
Copy link
Member Author

Choose a reason for hiding this comment

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

Apparently, this term isn't defined and the current docs don't render this in a special way, so I removed it.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks. I've seen this error before but never traced it back to this line. I agree this serves no purpose.

It could be something that only builds correctly with the docs team's build tools, since those pull in additional resources used by the server manual (or did if they no longer use Giza).

MongoDB manual
Copy link
Member Author

Choose a reason for hiding this comment

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

This file (and the next) were lacking a trailing newline.

with:
python-version: '2.7'

# The requirements file installs urllib3 with an incompatible version; we replace it with one that works
Copy link
Member

Choose a reason for hiding this comment

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

Is this worth a PR to mongodb/docs-tools? Worst case it doesn't get merged.

Copy link
Member Author

Choose a reason for hiding this comment

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

Created mongodb/docs-tools#599 to update this.

.github/workflows/docs.yml Show resolved Hide resolved
run: "rsync -a library/docs/ docs/source/"

- name: "Run Giza"
run: "giza make publish"
Copy link
Member

@jmikola jmikola Oct 11, 2022

Choose a reason for hiding this comment

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

@i80and: Any chance you know of a way to get giza to return a non-zero exit code on an erroneous docs build?

Quoting @alcaeus's comment in the OP:

I was not able to make giza make publish exit with a non-zero exit code, even when using a wrong filename to link to a file.

@alcaeus alcaeus merged commit f7ba251 into mongodb:master Oct 12, 2022
@alcaeus alcaeus deleted the add-docs-build-to-ci branch October 12, 2022 07:43
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