import subprocess
import sys

def build():
    command = [
        "uv", "run", "python", "-m", "pdoc",
        "-o", "./docs",
        "--logo", "./logo.png",
        "amachine/"
    ]
    try:
        subprocess.run(command, check=True)
    except subprocess.CalledProcessError:
        sys.exit(1)

if __name__ == "__main__":
    build()