Skip to content

Commit

Permalink
Merge pull request #283 from mavlink/pr-fix-docs
Browse files Browse the repository at this point in the history
Fix docs
  • Loading branch information
julianoes authored Nov 4, 2020
2 parents 22749aa + 105cddc commit 2de2310
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 2 deletions.
18 changes: 17 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

- name: Install prerequisites
run: |
pip3 install -r requirements.txt -r requirements-dev.txt
pip3 install -r requirements.txt -r requirements-dev.txt -r requirements-docs.txt
pip3 install auditwheel twine
- name: Create wheel
Expand All @@ -44,6 +44,11 @@ jobs:
run: |
ls -lh "wheelhouse/"
- name: Create docs
run: |
export PATH=$PATH:$HOME/.local/bin
make -C mavsdk html
- name: Upload to PyPi
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
Expand All @@ -54,6 +59,17 @@ jobs:
export PATH=$PATH:$HOME/.local/bin
twine upload wheelhouse/*.whl
- name: Upload docs
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
if: startsWith(github.ref, 'refs/tags/')
run: |
export PATH=$PATH:$HOME/.local/bin
other/tools/upload_docs.sh
ubuntu20-other:
name: Ubuntu 20.04 ${{ matrix.arch }}
runs-on: ubuntu-20.04
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Note: MAVDSK-Python runs `mavsdk/bin/mavsdk_server` when `await drone.connect()`
Make sure the version tag is set correctly before generating new documentation.

```
pip3 install sphinx numpydoc
pip3 install -r requirements-docs.txt
make -C mavsdk html
```

Expand Down
2 changes: 2 additions & 0 deletions mavsdk/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,5 @@
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['nature_adapted/static']

html_favicon = "nature_adapted/static/favicon.png"
Binary file added mavsdk/source/nature_adapted/static/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions other/tools/upload_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ s3cmd put -m text/javascript mavsdk/build/html/_static/doctools.js s3://mavsdk-p
s3cmd put -m text/javascript mavsdk/build/html/_static/underscore.js s3://mavsdk-python-docs/_static/
s3cmd put -m text/javascript mavsdk/build/html/_static/documentation_options.js s3://mavsdk-python-docs/_static/
s3cmd put -m text/javascript mavsdk/build/html/_static/language_data.js s3://mavsdk-python-docs/_static/
s3cmd put -m text/css mavsdk/build/html/_static/nature.css s3://mavsdk-python-docs/_static/
s3cmd put -m text/css mavsdk/build/html/_static/basic.css s3://mavsdk-python-docs/_static/

s3cmd put -m image/x-icon mavsdk/build/html/_static/favicon.png s3://mavsdk-python-docs/

# Set it all to public
s3cmd setacl -r s3://mavsdk-python-docs --acl-public
2 changes: 2 additions & 0 deletions requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sphinx>=3.3.0
numpydoc>=1.1.0

0 comments on commit 2de2310

Please sign in to comment.