-
Notifications
You must be signed in to change notification settings - Fork 414
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
Build documentation automatically with master merge and update website content #379
Conversation
.circleci/config.yml
Outdated
cd ../.. | ||
|
||
# Update website | ||
git clone git@github.com:facebookmicrosites/habitat-website.git |
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.
This actual publish step should be run only once the PR is merged into master
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.
Yes, that's for testing purposes. I added it as incomplete steps in the PR description.
Codecov Report
@@ Coverage Diff @@
## master #379 +/- ##
===========================================
- Coverage 64.49% 53.06% -11.43%
===========================================
Files 64 151 +87
Lines 2929 6479 +3550
Branches 84 84
===========================================
+ Hits 1889 3438 +1549
- Misses 1040 3041 +2001
Continue to review full report at Codecov.
|
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.
LGTM. Left general comments. Thanks for working on this.
.circleci/config.yml
Outdated
rm -rf published/docs/${dir} | ||
cp -r ../habitat-sim/build/docs-public/${dir} published/docs/. | ||
done | ||
git checkout published/docs/habitat-sim/index.html |
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.
index.html
will never be updated?
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.
It will be update only manually as we have hardcoded links to tutorials. cc @mosra if I understood incorrectly.
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.
Huh, no, it shouldn't behave like that, at all. I wasn't aware of https://github.com/facebookmicrosites/habitat-website/commit/f16a3d1c932a8b9ed1f6f48ef99a9f269ce0a909 -- it's behaving correctly on my side, generating links as intended (testing with current master). I bet it's due to some unfortunate minor difference in docutils on the CI?
In any case, the following patch should make it work correctly, as it explicitly uses the :ref:
role instead of relying on the overriden default role:
diff --git a/docs/pages/index.rst b/docs/pages/index.rst
index b2fe3e8..c1907aa 100644
--- a/docs/pages/index.rst
+++ b/docs/pages/index.rst
@@ -14,9 +14,9 @@ over 10,000 FPS multi-process on a single GPU!
.. TODO: this is waiting on m.css to propagate page titles to links
-- `New Actions <std:doc:new-actions>`
-- `Notebooks <std:doc:notebooks>`
-- `Creating a stereo agent <std:doc:stereo-agent>`
+- :ref:`New Actions <std:doc:new-actions>`
+- :ref:`Notebooks <std:doc:notebooks>`
+- :ref:`Creating a stereo agent <std:doc:stereo-agent>`
.. note-warning::
@mathfac can you confirm the above makes it work correctly, without the git checkout
needed?
.circleci/config.yml
Outdated
git commit -m "Build ${NOW}" | ||
git status | ||
git stash | ||
git push origin master |
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.
It might make sense to push both master/gh-pages together once all of the required copy/pasting is finished. If there is some issue in the below commands, master/gh-pages won't go out of sync.
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.
Thank you for this!
Apart from this one thing, I have basically the same comments as @apsdehal.
.circleci/config.yml
Outdated
conda install -y -c conda-forge pelican | ||
mkdir -p ../build/docs | ||
git submodule update --init | ||
doxygen |
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.
Since doxygen
is run by the shell script below again, this isn't necessary, only makes the build longer.
622a391
to
d0f0a7d
Compare
.circleci/config.yml
Outdated
- install_and_test_ubuntu | ||
filters: | ||
branches: | ||
only: autodoc |
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.
only: autodoc | |
only: master |
?
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.
Yes, planned to change to master, still need for testing.
.circleci/config.yml
Outdated
rm -rf __pycache__ | ||
git add . | ||
git commit -m "Build ${NOW}" | ||
# git push origin gh-pages |
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.
# git push origin gh-pages | |
git push origin gh-pages |
- run: | ||
name: Update public documentation | ||
command: | | ||
# Update website |
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.
Add
mkdir -p ~/.ssh
touch ~/.ssh/known_hosts
echo "github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==" >> ~/.ssh/known_hosts
To deal with the fingerprint issue.
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.
Thank you for the snipet! For know add checkout
step at the beginning. It should take care of that and may be useful for other manipulation with docs.
Successful doc updated run. |
The documentation update step succeeded on master branch. New "loadGibsonHouse" function is available in the public doc. |
* Add support for eval on all episodes * Add None correctly
…e content (facebookresearch#379) Before the proposed change we have to build and update documentation manually. As results Docs are quite outdated on our website: https://aihabitat.org/docs/. With current change documentation automatically will be updated with new commits in master powered by CircleCI. Install latex, pelican, doxygen and other dependencies needed. Setup securely ssh key for updating website repository. Rebuild Habitat-SIM with wide options enabled for documentation update. Build docs with Doxygen. Build docs with Mcss documentation. Update habitat-website master branch with changed parts of documentation. Update habitat-website gh-pages branch (website update) with changed parts of documentation. Apply master only branch filter. Run build as separate CircleCI job. Add links update for tutorials.
Motivation and Context
Before the proposed change we have to build and update documentation manually. As results Docs are quite outdated on our website: https://aihabitat.org/docs/. With current change documentation automatically will be updated with new commits in master powered by CircleCI.
How Has This Been Tested
Run CI and check produced commits for website content.
A commit to master branch of habitat-website:
![Screenshot 2019-12-13 00 37 28](https://user-images.githubusercontent.com/877440/70787583-dadaad00-1d43-11ea-9d81-af9fa12c3f8d.png)
A commit to gh-pages branch of habitat-website:
![Screenshot 2019-12-13 00 57 49](https://user-images.githubusercontent.com/877440/70787582-dadaad00-1d43-11ea-9f46-fbdc2cded934.png)
Types of changes
Checklist