diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 32984df1470928780692452760ef6a5b1700ceb3..8652cd00555b0eba50266bca5ac2fa1b971f1826 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -36,6 +36,17 @@ pages: only: - tags +confluence-doc: + stage: deploy + script: + - apt update + - apt install git -y + - pip install sphinx sphinx-confluencebuilder sphinxcontrib-blockdiag blockdiag sphinxcontrib-restbuilder sphinx_rtd_theme numpy m2r2 + - python setup.py install + - sphinx-build -M confluence "doc" "doc" + only: + - tags + release-pypi: tags: - docker diff --git a/doc/conf.py b/doc/conf.py index 8eaa85590310e374c9c214334b50d7f4e8e02437..7dae7279c1867108fb090f6e383882afacaf0ff9 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -43,9 +43,31 @@ extensions = [ "sphinx.ext.ifconfig", "sphinx.ext.viewcode", "sphinxcontrib.restbuilder", + "sphinxcontrib.confluencebuilder", "m2r2", ] + +def get_user_pass(): + import getpass + + if "WIKI_USER" in os.environ: + user = os.environ["WIKI_USER"] + else: + user = getpass.getpass("Username:") + if "WIKI_PASS" in os.environ: + password = os.environ["WIKI_PASS"] + else: + password = getpass.getpass() + return user, password + + +confluence_publish = True +confluence_space_name = "BPWP" +confluence_parent_page = "TraceWin python tools" +confluence_server_url = "https://confluence.esss.lu.se/" +confluence_server_user, confluence_server_pass = get_user_pass() + # set napoleon style docstring napoleon_google_docstring = False napoleon_use_param = False