...
 
Commits (6)
......@@ -3,8 +3,9 @@ image: alpine
pages:
script:
- apk --no-cache add py3-pip python3-dev
- pip3 install sphinx
- pip3 install -r requirements.txt
- apk --no-cache add make
- if [ -d "$MODPATH" ]; then make MODPATH=$MODPATH -C docs/ apidoc; fi
- make -C $DOCSPATH html
- mv $DOCSPATH/build/html public/
artifacts:
......@@ -12,7 +13,8 @@ pages:
- public
only:
refs:
- tags
- tags
variables:
DOCSPATH: ./
MODPATH: ../pydemo
......@@ -27,8 +27,12 @@ Using the template
root level of your repository. Alternatively, you can explicitly
define the path to ``.gitlab-ci.yml`` in your project settings.
Don't forget to override ``DOCSPATH`` in ``.gitlab-ci.yml``
by assigning the value ``path/to/docs/``.
Don't forget to override ``DOCSPATH`` and ``MODPATH`` in ``.gitlab-ci.yml``:
* ``DOCSPATH`` should be assigned the value of the path you cloned the repository
into.
* ``MODPATH`` should be assinged the value of the path of the python-package
to be documented **relative** to the ``DOCSPATH``.
By default CI is configured to run only when a tag is created.
......@@ -40,7 +44,10 @@ Using the template
#. Create API docs for your package::
$ make MODPATH=path/to/package -C path/to/docs/ apidoc
$ make MODPATH=<package-path> -C path/to/docs/ apidoc
where ``<package-path>`` is the path of the package **relative**
to ``path/to/docs``.
#. Build documentation::
......@@ -50,7 +57,7 @@ Using the template
Of course, the last two commands can be combined as follows::
$ make -C path/to/docs/ MODPATH=path/to/package apidoc html
$ make MODPATH=<package-path> -C path/to/docs/ apidoc html
Precedence of ``apidoc`` over the ``html`` rule is important though.
......
......@@ -32,7 +32,7 @@ sys.path.insert(0, os.path.abspath(rel_src_path_level))
# -- Project information -----------------------------------------------------
project = 'dx-docs-template'
copyright = 'demetriou engineering ltd.'
copyright = 'demetriou engineering ltd'
author = 'Konstantinos Demartinos'
#
# # The short X.Y version
......
......@@ -26,3 +26,10 @@ Usage
:glob:
_modules/modules
Indices and tables
------------------
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`