Prepare v1.0.0 release #262
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Deploy Sphinx Docs | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [main, main_public] | |
| paths: | |
| - ".github/workflows/sphinx-docs.yml" | |
| - "README.md" | |
| - "docs/**" | |
| - "client/python/projectairsim/docs/**" | |
| - "client/python/projectairsim/src/**" | |
| pull_request: | |
| branches: [main, main_public] | |
| paths: | |
| - ".github/workflows/sphinx-docs.yml" | |
| - "README.md" | |
| - "docs/**" | |
| - "client/python/projectairsim/docs/**" | |
| - "client/python/projectairsim/src/**" | |
| jobs: | |
| build-docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Rewrite root README links for the docs build | |
| run: | | |
| # README links need to be relative to docs/ when MyST includes the | |
| # file, while image paths remain relative to the repository root. | |
| sed -i 's|](docs/images/|](__README_IMAGE_ROOT__/|g' README.md | |
| sed -i 's|docs/||g' README.md | |
| sed -i 's|](__README_IMAGE_ROOT__/|](docs/images/|g' README.md | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install dependencies for main docs | |
| working-directory: ./docs | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Install dependencies for Python client docs | |
| working-directory: ./client/python/projectairsim/docs | |
| run: pip install -r requirements.txt | |
| - name: Build Python client docs | |
| working-directory: ./client/python/projectairsim/docs | |
| run: | | |
| rm -rf build | |
| make html | |
| - name: Build main docs | |
| working-directory: ./docs | |
| run: | | |
| rm -rf build | |
| make html | |
| - name: Copy README showcase images into main docs | |
| run: | | |
| mkdir -p docs/build/html/images/autonomy | |
| cp \ | |
| docs/images/adjustable_weather.gif \ | |
| docs/images/airtaxi_in_dynamic_city.jpg \ | |
| docs/images/large_tilt_rotor_vtol_cesium.gif \ | |
| docs/images/simulate_your_swarm.gif \ | |
| docs/images/wind_turbine_inspection.gif \ | |
| docs/build/html/images/ | |
| cp \ | |
| docs/images/autonomy/takeoff-landing-app-cam-view.gif \ | |
| docs/build/html/images/autonomy/ | |
| - name: Copy Python client docs into main docs | |
| run: | | |
| mkdir -p docs/build/html/client_api | |
| cp -r client/python/projectairsim/docs/build/html/* docs/build/html/client_api/ | |
| - name: Deploy to gh_page branch | |
| if: github.event_name == 'push' | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: docs/build/html | |
| publish_branch: gh_page | |
| force_orphan: true |