-
Notifications
You must be signed in to change notification settings - Fork 265
Add Github Actions workflow to build documentation #993
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: "Docs" | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "v*.*" | ||
- "master" | ||
- "feature/*" | ||
push: | ||
branches: | ||
- "v*.*" | ||
- "master" | ||
- "feature/*" | ||
|
||
jobs: | ||
giza: | ||
name: "Build Docs" | ||
runs-on: "ubuntu-20.04" | ||
|
||
steps: | ||
- name: "Checkout library" | ||
uses: "actions/checkout@v3" | ||
with: | ||
path: library | ||
fetch-depth: 2 | ||
|
||
- name: "Checkout docs" | ||
uses: "actions/checkout@v3" | ||
with: | ||
repository: mongodb/docs-php-library | ||
path: docs | ||
fetch-depth: 2 | ||
|
||
- name: "Setup python" | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '2.7' | ||
|
||
# The requirements file installs urllib3 with an incompatible version; we replace it with one that works | ||
- name: "Install giza" | ||
run: | | ||
pip install -r https://raw.githubusercontent.com/mongodb/docs-tools/master/giza/requirements.txt | ||
pip install urllib3==1.25.2 | ||
|
||
- name: "Sync documentation" | ||
run: "rsync -a library/docs/ docs/source/" | ||
jmikola marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- name: "Run Giza" | ||
run: "giza make publish" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
working-directory: docs | ||
|
||
- name: "Upload built documentation" | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: php-library-docs.tar.gz | ||
path: docs/build/public/master/php-library.tar.gz |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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). |
||
BSON spec, see `bsonspec.org <https://bsonspec.org/>`_. | ||
of JSON documents, though it contains more data types than JSON. For the BSON | ||
spec, see `bsonspec.org <https://bsonspec.org/>`_. | ||
|
||
By default, the |php-library| returns BSON documents as | ||
:phpclass:`MongoDB\\Model\\BSONDocument` objects and BSON arrays as | ||
|
@@ -106,7 +106,7 @@ of the PHP class in a special property within the BSON document. | |
When deserializing a PHP variable from BSON, the encoded class name of a | ||
:php:`Persistable <mongodb-bson-persistable>` object will override any class | ||
specified in the type map, but it will not override ``"array"`` and | ||
``"stdClass"`` or ``"object"``. This is discussed in the | ||
``"stdClass"`` or ``"object"``. This is discussed in the | ||
:php:`persistence specification <mongodb.persistence>` but it bears | ||
repeating. | ||
|
||
|
@@ -121,7 +121,7 @@ Consider the following class definition: | |
private $id; | ||
private $name; | ||
private $createdAt; | ||
|
||
public function __construct($name) | ||
{ | ||
$this->id = new MongoDB\BSON\ObjectId; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -103,4 +103,4 @@ See Also | |
- :ref:`Tailable Cursor Iteration <php-tailable-cursor>` | ||
- :manual:`Change Streams </changeStreams>` documentation in the MongoDB manual | ||
- :manual:`Change Events </reference/change-events/>` documentation in the | ||
MongoDB manual | ||
MongoDB manual | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file (and the next) were lacking a trailing newline. |
There was a problem hiding this comment.
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.There was a problem hiding this comment.
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.