Skip to content

Publish tvm-ffi docs #44

Publish tvm-ffi docs

Publish tvm-ffi docs #44

name: Publish tvm-ffi docs
on:
workflow_dispatch:
jobs:
build_wheels:
name: Build docs
runs-on: ubuntu-latest
steps:
- name: Setup Python 3.13
uses: astral-sh/setup-uv@b75a909f75acd358c2196fb9a5f1299a9a8868a4 # v6.7.0
with:
python-version: 3.13
activate-environment: true
- uses: actions/checkout@v4
with:
submodules: recursive
path: tvm-site
- name: Checkout tvm-ffi
uses: actions/checkout@v4
with:
repository: apache/tvm-ffi
submodules: recursive
path: tvm-ffi
- name: Install doxygen
run: |
sudo apt install -y doxygen graphviz
- name: Build docs
working-directory: tvm-ffi/
env:
BUILD_CPP_DOCS: 1
BUILD_RUST_DOCS: 1
run: |
uv run --group docs sphinx-build -M html docs docs/_build
uv run --with requests python ../tvm-site/scripts/download_3rdparty_embeds.py -v --path=docs/_build/html
- name: Deploy docs
working-directory: tvm-site/
run: |
git fetch
git checkout -B asf-site origin/asf-site
rm -rf ffi
cp -r ../tvm-ffi/docs/_build/html ffi
git config user.name tvm-bot
git config user.email 95660001+tvm-bot@users.noreply.github.com
git add -f ffi
git commit -m"deploying ffi docs" ffi
git status
for i in {1..3}; do
if git push origin asf-site; then
echo "Push successful"
break
else
echo "Push failed, retrying ($i)..."
sleep 2
git pull --rebase origin asf-site
fi
done