ci: use sphinx-apidoc to build docs

parent 6a6ca6d2
......@@ -2,6 +2,8 @@ stages:
- build
- package
- test
- docs
- deploy
# -- build ------------------
......@@ -190,3 +192,54 @@ test:stretch:python3:
# extract and run the tests
- tar -xf *.tar.* --strip-components 1 --wildcards lscsoft-glue*/test
- make -C test PYTHON=python3
docs:
stage: docs
image: python
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
before_script:
# install docs requirements
- python -m pip install sphinx sphinx_rtd_theme
# install glue and lalsuite (everything else is in setup.py)
- python -m pip install . lalsuite
script:
- glue_version=$(python setup.py --version)
- mkdir -v docs
- cd docs
# generate docs skeleton
- python -m sphinx.ext.apidoc
--module-first
--separate
--full
--ext-autodoc
--ext-intersphinx
--doc-project "lscsoft-glue"
--doc-author "The LIGO Scientific Collaboration and The Virgo Collaboration"
--doc-version "${glue_version}"
--output-dir .
../glue
# use module page as index
- mv -v glue.rst index.rst
# use sphinx_rtd_theme
- sed -i 's/alabaster/sphinx_rtd_theme/g' conf.py
# run sphinx to generate docs
- python -m sphinx -M html . build
artifacts:
paths:
- docs/build
cache:
paths:
- .cache/pip
pages:
stage: deploy
dependencies:
- docs
only:
- tags
script:
- mv docs/build/html public
artifacts:
paths:
- public
......@@ -114,7 +114,7 @@ setup(
description = "Grid LSC User Engine",
long_description = longdesc,
long_description_content_type = 'text/markdown',
url = "http://www.lsc-group.phys.uwm.edu/daswg/",
url = "https://docs.ligo.org/lscsoft/glue/",
license = 'GPLv2+',
packages = [ 'glue', 'glue.ligolw', 'glue.ligolw.utils', 'glue.segmentdb', 'glue.auth'],
install_requires=install_requires,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment