mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 16:34:47 +01:00

* feat: use github actions to deploy docs fixes #4473 * fix: install xonsh * fix: doc action * chore: support *.md for documentation * fix: remove hardcoded docs link it affects local testing * refactor: move sphinx extensions to its own package * fix: remove deprecated get_theme_dir As of Sphinx 1.2, this is passed to Sphinx via a ``setup.py`` entry point, and no longer needs to be included in your documentation's ``conf.py``. * feat: jinja2 render without affecting incremental build * style: * feat: auto generate API doc no need to create a file for each module * chore: watch top-level and nested files * refactor: update lib api-docs as well * fix: import errors when doc generated for some modules * fix: relative path * feat: add release handling * Update .github/workflows/docs.yml Co-authored-by: Gil Forsyth <gforsyth@users.noreply.github.com> * refactor: use github-app-token * chore: deploy docs only when merged Co-authored-by: Gil Forsyth <gforsyth@users.noreply.github.com>
18 lines
499 B
Python
18 lines
499 B
Python
from livereload import Server, shell
|
|
from pathlib import Path
|
|
import sys
|
|
|
|
cur_dir = Path(__file__).parent
|
|
server = Server()
|
|
|
|
if "no" not in sys.argv:
|
|
exts = ("rst", "py", "jinja2")
|
|
print(f"Watching file changes {exts}")
|
|
cmd = shell("make html", cwd=str(cur_dir))
|
|
for ext in exts:
|
|
# nested or
|
|
server.watch(str(cur_dir / f"**.{ext}"), cmd)
|
|
# top level
|
|
server.watch(str(cur_dir / f"**/*.{ext}"), cmd)
|
|
|
|
server.serve(root=str(cur_dir / "_build" / "html"))
|