diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 000000000..82e0f9318 --- /dev/null +++ b/.github/workflows/docs.yml @@ -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/**" + - "autogalaxy/**" + - "pyproject.toml" + - ".readthedocs.yaml" + - ".github/workflows/docs.yml" + pull_request: + paths: + - "docs/**" + - "autogalaxy/**" + - "pyproject.toml" + - ".readthedocs.yaml" + - ".github/workflows/docs.yml" + workflow_dispatch: + +jobs: + docs: + uses: PyAutoLabs/PyAutoHeart/.github/workflows/docs-build.yml@main + with: + package: autogalaxy + secrets: inherit diff --git a/.gitignore b/.gitignore index 3525e9b70..8c70a8864 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,8 @@ test_autogalaxy/unit/pipeline/files/plot/PlotterInterface/inversion/fits/reconst test_autogalaxy/unit/data_temp/simulate_and_fit/image.fits test_autogalaxy/unit/data_temp/simulate_and_fit/noise_map.fits test_autogalaxy/unit/data_temp/simulate_and_fit/psf.fits + +# Sphinx build artifacts (generated at docs build time, never committed) +docs/_build +docs/api/generated +docs/api/_autosummary diff --git a/docs/conf.py b/docs/conf.py index 7b0e442fb..1e0f426ea 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -122,13 +122,6 @@ # pygments_dark_style = "monokai" add_function_parentheses = False -html_context = { - "menu_links_name": "Repository", - "doc_path": "docs", - "github_project": "pyautogalaxy", - "github_repo": "pyautogalaxy", - "github_version": "master", -} language = "en" from sphinx.builders.html import StandaloneHTMLBuilder diff --git a/docs/sphinx_warning_baseline.txt b/docs/sphinx_warning_baseline.txt new file mode 100644 index 000000000..f96ac0672 --- /dev/null +++ b/docs/sphinx_warning_baseline.txt @@ -0,0 +1 @@ +105 diff --git a/readthedocs.yaml b/readthedocs.yaml deleted file mode 100644 index 7362fe557..000000000 --- a/readthedocs.yaml +++ /dev/null @@ -1,17 +0,0 @@ -version: 2 - -build: - os: ubuntu-22.04 - tools: - python: "3.11" - -python: - install: - - method: pip - path: . - extra_requirements: - - docs - -sphinx: - configuration: docs/conf.py - fail_on_warning: false \ No newline at end of file