Update CI configuration

* Install python dependencies from file
* Generate automatically API docs
parent d01811d2
......@@ -3,8 +3,9 @@ image: alpine
- apk --no-cache add py3-pip python3-dev
- pip3 install sphinx
- pip3 install -r requirements.txt
- apk --no-cache add make
- make MODPATH=$MODPATH -C docs/ apidoc
- make -C $DOCSPATH html
- mv $DOCSPATH/build/html public/
......@@ -12,7 +13,8 @@ pages:
- public
- tags
- tags
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
* ``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.
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