diff --git a/.github/workflows/python-api-docs.yaml b/.github/workflows/python-api-docs.yaml index 9c05f1e..8b764b0 100644 --- a/.github/workflows/python-api-docs.yaml +++ b/.github/workflows/python-api-docs.yaml @@ -1,9 +1,12 @@ -name: Build Python API Docs +name: Build And Publish Python API Docs on: workflow_dispatch: -permissions: {} +permissions: + contents: read + pages: write + id-token: write jobs: build-api-docs: @@ -20,13 +23,16 @@ jobs: - name: "Configure Git safe directory" run: git config --global --add safe.directory /__w/bdk-python/bdk-python - - name: Set up 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 + uses: actions-rust-lang/setup-rust-toolchain@v1.15.2 + with: + cache: true + rust-src-dir: ${{ github.workspace }}/bdk-ffi/bdk-ffi - name: "Generate bdk.py" env: @@ -46,4 +52,21 @@ jobs: uses: actions/upload-artifact@v4 with: name: artifact-bdkpython-api-docs - path: /home/runner/work/bdk-python/bdk-python/docs/_build/html + path: docs/_build/html + + - name: "Upload API Docs for GitHub Pages" + uses: actions/upload-pages-artifact@v3 + with: + path: docs/_build/html + + deploy-api-docs: + name: "Deploy bdkpython API docs on GitHub Pages" + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-24.04 + needs: build-api-docs + steps: + - name: "Deploy to GitHub Pages" + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file