diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000000000000000000000000000000000000..32c51aa14e72f8aca7875cc0e3754f8b46587509
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,10 @@
+pages:
+  stage: deploy
+  script:
+  - python3 setup.py build_sphinx
+  - mv build/sphinx/html public
+  artifacts:
+    paths:
+    - public
+  only:
+  - docs
diff --git a/docs/conf.py b/docs/conf.py
new file mode 100644
index 0000000000000000000000000000000000000000..307a5e0854b11703db03515d87259c1d015ff6c9
--- /dev/null
+++ b/docs/conf.py
@@ -0,0 +1,51 @@
+# Configuration file for the Sphinx documentation builder.
+#
+# This file only contains a selection of the most common options. For a full
+# list see the documentation:
+# https://www.sphinx-doc.org/en/master/usage/configuration.html
+
+# -- Path setup --------------------------------------------------------------
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#
+#import os
+#import sys
+#sys.path.insert(0, os.path.abspath('../'))
+
+# -- Project information -----------------------------------------------------
+
+# Sphinx's options are specified by setup.py
+#project = 'pymagglobal'
+#copyright = '2020 Helmholtz Centre Potsdam GFZ, German Research Centre for Geosciences, Potsdam, Germany'
+## The full version, including alpha/beta/rc tags
+#release = '0.0.2'
+# Due to some reason not set by setup.py
+author = 'Schanner, M.A. and Mauerberger, S.'
+
+# -- General configuration ---------------------------------------------------
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = []
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+# This pattern also affects html_static_path and html_extra_path.
+exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
+
+# -- Options for HTML output -------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages.  See the documentation for
+# a list of builtin themes.
+html_theme = 'classic'
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
diff --git a/docs/index.rst b/docs/index.rst
new file mode 100644
index 0000000000000000000000000000000000000000..092fa6bec172e0f295a82e8d7364eb3185a4a17c
--- /dev/null
+++ b/docs/index.rst
@@ -0,0 +1,16 @@
+Welcome to pymagglobal's documentation!
+=======================================
+
+Nothing here yet ...
+
+.. toctree::
+   :maxdepth: 2
+   :caption: Contents:
+
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
diff --git a/setup.py b/setup.py
index c1cdfdf2f5df1e5bb19a45599647d9be28ec8888..f842d0081ece276381316b46fd536e9ef9f82fb6 100644
--- a/setup.py
+++ b/setup.py
@@ -1,31 +1,30 @@
-'''
-    This is the install file for pymagglobal.
-
-    Copyright (C) 2020 Helmholtz Centre Potsdam GFZ,
-        German Research Centre for Geosciences, Potsdam, Germany
-
-    Cite as:
-    TODO
-
-    This file is part of pymagglobal.
-
-    pymagglobal is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    pymagglobal is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with pymagglobal. If not, see <https://www.gnu.org/licenses/>.
-'''
+# This is the install file for pymagglobal.
+#
+# Copyright (C) 2020 Helmholtz Centre Potsdam GFZ,
+#     German Research Centre for Geosciences, Potsdam, Germany
+#
+# Cite as:
+# TODO
+#
+# This file is part of pymagglobal.
+#
+# pymagglobal is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# pymagglobal is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with pymagglobal. If not, see <https://www.gnu.org/licenses/>.
 
 import os
 import codecs
 from setuptools import setup
+from sphinx.setup_command import BuildDoc
 
 
 # https://packaging.python.org/guides/single-sourcing-package-version/
@@ -43,12 +42,14 @@ def get_version(rel_path):
     else:
         raise RuntimeError("Unable to find version string.")
 
-
-description = ''' python interface for global geomagnetic field models '''
+name = 'pymagglobal'
+version = get_version('pymagglobal/__init__.py')
+description = '''python interface for global geomagnetic field models '''
+copyright = '2020 Helmholtz Centre Potsdam GFZ, German Research Centre for Geosciences, Potsdam, Germany'
 
 setup(
-    name='pymagglobal',
-    version=get_version('pymagglobal/__init__.py'),
+    name=name,
+    version=version,
     author='Maximilian Schanner',
     author_email='arthus@gfz-potsdam.de',
     packages=['pymagglobal'],
@@ -58,4 +59,12 @@ setup(
     install_requires=[],
     package_data={'pymagglobal': ['dat/*']},
     include_package_data=True,
+    cmdclass={'build_sphinx': BuildDoc},
+    # Override docs/conf.py settings
+    command_options={
+        'build_sphinx': {
+            'project':    ('dfetup.py', name),
+            'release':    ('dfetup.py', version),
+            'copyright':  ('dfetup.py', copyright),
+            'source_dir': ('dfetup.py', 'docs')}},
 )