diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..bb6fab780b0a411dccecb8b48c0be598b2d6d3a4 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,68 @@ +variables: + GIT_SUBMODULE_STRATEGY: recursive + +stages: + - build + - ragdoc_build + - ragdoc_view + - publish + +before_script: + - export GRADLE_USER_HOME=`pwd`/.gradle + +cache: + paths: + - .gradle/wrapper + - .gradle/caches + +build: + image: openjdk:11 + stage: build + script: + - ./gradlew --console=plain --no-daemon assemble + artifacts: + paths: + - "src/gen" + +ragdoc_build: + image: openjdk:8 + stage: ragdoc_build + script: + - git clone --recurse-submodules git@git-st.inf.tu-dresden.de:jastadd/ragdoc-builder.git + - cd ragdoc-builder + - ./gradlew fatJar + - JAVA_FILES="$(find ../../src/ -name '*.java')" + - BOOT_CLASSPATH="/usr/local/openjdk-8/jre/lib/rt.jar" + - java -jar rd-builder.jar -d ../data -bootclasspath $BOOT_CLASSPATH $JAVA_FILES + artifacts: + paths: + - "data/" + +ragdoc_view: + image: "node:15.6.0-buster" + stage: ragdoc_view + script: + - git clone git@git-st.inf.tu-dresden.de:jastadd/ragdoc-view.git + - cd ragdoc-view/src + - ln -s ../../data + - cd .. + - npm install + - ng build --base-href . + artifacts: + paths: + - "ragdoc-view/dist/" + +pages: + image: python:3.7-alpine + stage: publish + before_script: + - pip install -U sphinx sphinx-rtd-theme recommonmark sphinxemoji sphinx-markdown-tables + script: + - mkdir -p pages/_static/ragdoc + - cp -r ragdoc-view/dist/* pages/_static/ragdoc + - sphinx-build -b html pages/ public + artifacts: + paths: + - public + only: + - master diff --git a/pages/.gitignore b/pages/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..41878fd586c3dd68f05ef1402c78f6bfc3eaa918 --- /dev/null +++ b/pages/.gitignore @@ -0,0 +1,5 @@ +/ragdoc-builder +/ragdoc-view +/_static/ +/public/ +/data/ diff --git a/pages/Makefile b/pages/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..7878ee5305af7d6c04860113aa9ef008991d07af --- /dev/null +++ b/pages/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = . +BUILDDIR = public + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/pages/conf.py b/pages/conf.py new file mode 100644 index 0000000000000000000000000000000000000000..586b1692fa3f67a2efb151789f8bed119fb9a501 --- /dev/null +++ b/pages/conf.py @@ -0,0 +1,52 @@ +# 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 ----------------------------------------------------- + +project = 'Minimal RagConnect Example' +copyright = '2021, René Schöne, Sebastian Ebert' +author = 'René Schöne, Sebastian Ebert' + + +# -- 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 = 'alabaster' + +# 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/pages/index.rst b/pages/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..7dd28b316480b13dd90b4e7f999ebeb45772aaa5 --- /dev/null +++ b/pages/index.rst @@ -0,0 +1,25 @@ +.. Minimal RagConnect Example documentation master file, created by + sphinx-quickstart on Wed Jan 27 17:59:48 2021. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to Minimal RagConnect Example's documentation! +====================================================== + +.. toctree:: + :maxdepth: 2 + :caption: Contents: +.. .. raw:: html +.. :file: _static/ragdoc.html + +some text + +documentation at `ragdoc <_static/ragdoc/index.html>`_ + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/pages/make.bat b/pages/make.bat new file mode 100644 index 0000000000000000000000000000000000000000..c6abfba46443f5335943b13912c8d7b6d62ae644 --- /dev/null +++ b/pages/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=. +set BUILDDIR=public + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd