Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Docs

# Docs build check is defined once, centrally, in PyAutoHeart's reusable
# workflow (Heart owns all health/readiness checking). This thin caller
# builds the Sphinx docs on PRs and fails on warning-count regression
# against docs/sphinx_warning_baseline.txt.

on:
push:
branches: [main]
paths:
- "docs/**"
- "autocti/**"
- "pyproject.toml"
- ".readthedocs.yaml"
- ".github/workflows/docs.yml"
pull_request:
paths:
- "docs/**"
- "autocti/**"
- "pyproject.toml"
- ".readthedocs.yaml"
- ".github/workflows/docs.yml"
workflow_dispatch:

jobs:
docs:
uses: PyAutoLabs/PyAutoHeart/.github/workflows/docs-build.yml@main
with:
package: autocti
secrets: inherit
32 changes: 2 additions & 30 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,38 +13,10 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
#

from pyprojroot import here

# /home/docs/checkouts/readthedocs.org/user_builds/pyautocti/checkouts/latest/docs

clone_path = str(here())

import os
import sys
from pathlib import Path

sys.path.insert(0, os.path.abspath("."))


def clone_repo(name: str, url: str):
clone = f"git clone {url}/{name}"
os.system(clone)
os.system(f"pip install -r {name}/requirements.txt")
os.system(f"rm -rf {name}/docs")
sys.path.insert(
0,
os.path.abspath(f"{clone_path}/{name}"),
)


clone_repo(name="PyAutoFit", url="https://github.com/rhayes777")
clone_repo(name="PyAutoArray", url="https://github.com/Jammy2211")

clone_path = os.path.split(clone_path)[0]

sys.path.insert(
0,
os.path.abspath(clone_path),
)
sys.path.insert(0, str(Path(".").resolve()))

import autocti

Expand Down
10 changes: 0 additions & 10 deletions docs/requirements.txt

This file was deleted.

1 change: 1 addition & 0 deletions docs/sphinx_warning_baseline.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
15
Loading