Skip to content

Commit 2de2310

Browse files
authored
Merge pull request #283 from mavlink/pr-fix-docs
Fix docs
2 parents 22749aa + 105cddc commit 2de2310

File tree

6 files changed

+26
-2
lines changed

6 files changed

+26
-2
lines changed

.github/workflows/main.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030

3131
- name: Install prerequisites
3232
run: |
33-
pip3 install -r requirements.txt -r requirements-dev.txt
33+
pip3 install -r requirements.txt -r requirements-dev.txt -r requirements-docs.txt
3434
pip3 install auditwheel twine
3535
3636
- name: Create wheel
@@ -44,6 +44,11 @@ jobs:
4444
run: |
4545
ls -lh "wheelhouse/"
4646
47+
- name: Create docs
48+
run: |
49+
export PATH=$PATH:$HOME/.local/bin
50+
make -C mavsdk html
51+
4752
- name: Upload to PyPi
4853
env:
4954
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
@@ -54,6 +59,17 @@ jobs:
5459
export PATH=$PATH:$HOME/.local/bin
5560
twine upload wheelhouse/*.whl
5661
62+
- name: Upload docs
63+
env:
64+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
65+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
66+
if: startsWith(github.ref, 'refs/tags/')
67+
run: |
68+
export PATH=$PATH:$HOME/.local/bin
69+
other/tools/upload_docs.sh
70+
71+
72+
5773
ubuntu20-other:
5874
name: Ubuntu 20.04 ${{ matrix.arch }}
5975
runs-on: ubuntu-20.04

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Note: MAVDSK-Python runs `mavsdk/bin/mavsdk_server` when `await drone.connect()`
110110
Make sure the version tag is set correctly before generating new documentation.
111111

112112
```
113-
pip3 install sphinx numpydoc
113+
pip3 install -r requirements-docs.txt
114114
make -C mavsdk html
115115
```
116116

mavsdk/source/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,5 @@
5959
# relative to this directory. They are copied after the builtin static files,
6060
# so a file named "default.css" will overwrite the builtin "default.css".
6161
html_static_path = ['nature_adapted/static']
62+
63+
html_favicon = "nature_adapted/static/favicon.png"
9.55 KB
Loading

other/tools/upload_docs.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ s3cmd put -m text/javascript mavsdk/build/html/_static/doctools.js s3://mavsdk-p
1515
s3cmd put -m text/javascript mavsdk/build/html/_static/underscore.js s3://mavsdk-python-docs/_static/
1616
s3cmd put -m text/javascript mavsdk/build/html/_static/documentation_options.js s3://mavsdk-python-docs/_static/
1717
s3cmd put -m text/javascript mavsdk/build/html/_static/language_data.js s3://mavsdk-python-docs/_static/
18+
s3cmd put -m text/css mavsdk/build/html/_static/nature.css s3://mavsdk-python-docs/_static/
19+
s3cmd put -m text/css mavsdk/build/html/_static/basic.css s3://mavsdk-python-docs/_static/
20+
21+
s3cmd put -m image/x-icon mavsdk/build/html/_static/favicon.png s3://mavsdk-python-docs/
1822

1923
# Set it all to public
2024
s3cmd setacl -r s3://mavsdk-python-docs --acl-public

requirements-docs.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
sphinx>=3.3.0
2+
numpydoc>=1.1.0

0 commit comments

Comments
 (0)