Build And Publish Python API Docs #3
Workflow file for this run
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 Python API Docs | |
| on: | |
| workflow_dispatch: | |
| permissions: {} | |
| jobs: | |
| build-api-docs: | |
| name: "Build bdkpython API docs" | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: "Checkout" | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| persist-credentials: false | |
| fetch-depth: 0 | |
| - name: "Configure Git safe directory" | |
| run: git config --global --add safe.directory /__w/bdk-python/bdk-python | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: "Set up Rust" | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - name: "Generate bdk.py" | |
| env: | |
| PYBIN: ${{ env.pythonLocation }}/bin | |
| run: bash ./scripts/generate-linux.sh | |
| - name: "Install Sphinx and Theme" | |
| run: pip3 install sphinx sphinx_rtd_theme | |
| - name: "Generate python API Documentation" | |
| run: python3 ./docs/generate_docs.py | |
| - name: "Build HTML Documentation" | |
| run: python3 -m sphinx -b html -W --keep-going docs/source docs/_build/html | |
| - name: "Upload API Docs" | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: artifact-bdkpython-api-docs | |
| path: /home/runner/work/bdk-python/bdk-python/docs/_build/html |