Skip to content

Commit f72c4c3

Browse files
committed
ci: add job for deploying api docs on github pages
1 parent 584668a commit f72c4c3

File tree

1 file changed

+28
-5
lines changed

1 file changed

+28
-5
lines changed

.github/workflows/python-api-docs.yaml

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
name: Build Python API Docs
1+
name: Build And Publish Python API Docs
22

33
on:
44
workflow_dispatch:
55

6-
permissions: {}
6+
permissions:
7+
contents: read
8+
pages: write
9+
id-token: write
710

811
jobs:
912
build-api-docs:
@@ -20,13 +23,16 @@ jobs:
2023
- name: "Configure Git safe directory"
2124
run: git config --global --add safe.directory /__w/bdk-python/bdk-python
2225

23-
- name: Set up Python
26+
- name: "Set up Python"
2427
uses: actions/setup-python@v5
2528
with:
2629
python-version: "3.12"
2730

2831
- name: "Set up Rust"
29-
uses: actions-rust-lang/setup-rust-toolchain@v1
32+
uses: actions-rust-lang/[email protected]
33+
with:
34+
cache: true
35+
rust-src-dir: ${{ github.workspace }}/bdk-ffi/bdk-ffi
3036

3137
- name: "Generate bdk.py"
3238
env:
@@ -46,4 +52,21 @@ jobs:
4652
uses: actions/upload-artifact@v4
4753
with:
4854
name: artifact-bdkpython-api-docs
49-
path: /home/runner/work/bdk-python/bdk-python/docs/_build/html
55+
path: docs/_build/html
56+
57+
- name: "Upload API Docs for GitHub Pages"
58+
uses: actions/upload-pages-artifact@v3
59+
with:
60+
path: docs/_build/html
61+
62+
deploy-api-docs:
63+
name: "Deploy bdkpython API docs on GitHub Pages"
64+
environment:
65+
name: github-pages
66+
url: ${{ steps.deployment.outputs.page_url }}
67+
runs-on: ubuntu-24.04
68+
needs: build-api-docs
69+
steps:
70+
- name: "Deploy to GitHub Pages"
71+
id: deployment
72+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)