diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index 6b4d9ed..6f1938e 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -1,7 +1,6 @@ on: pull_request: - push: - branches: [main] + release: jobs: doc: @@ -11,10 +10,8 @@ jobs: - uses: actions/setup-python@v2 with: python-version: "3.9" - - run: | - python -m pip install -e .[doc] - cd doc - sphinx-build -b html -d _build/doctrees . _build/html + - run: python -m pip install -e .[doc] + - run: python doc/build.py - uses: peaceiris/actions-gh-pages@v3 if: github.ref == 'refs/heads/main' with: diff --git a/README.rst b/README.rst index 665d1e1..c9be0e2 100644 --- a/README.rst +++ b/README.rst @@ -1,6 +1,8 @@ Jacobi ====== +`Documentation `_ + Fast numerical derivatives for real analytic functions with arbitrary round-off error. Features diff --git a/doc/build.py b/doc/build.py new file mode 100755 index 0000000..fd5e8d5 --- /dev/null +++ b/doc/build.py @@ -0,0 +1,8 @@ +#!/usr/bin/env python3 +import subprocess as subp +from pathlib import Path +import sys + +cmd = "sphinx-build -W -b html -d _build/doctrees . _build/html" + +sys.exit(subp.call(cmd.split(), cwd=Path(__file__).parent)) diff --git a/doc/conf.py b/doc/conf.py index 32df565..6f799c6 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -12,8 +12,6 @@ # All configuration values have a default; values that are commented out # serve to show the default. -# import sys -# import os from pathlib import Path with open("index.rst.in") as f: @@ -21,6 +19,10 @@ with open(Path("..") / "README.rst") as f: readme = f.read().replace("doc/", "") + # remove line 4 + lines = readme.split("\n") + lines = lines[:3] + lines[4:] + readme = "\n".join(lines) with open("index.rst", "w") as f: f.write(stub + "\n" + readme)