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