Skip to content
Snippets Groups Projects
Commit e4402ccb authored by Franck Pérignon's avatar Franck Pérignon
Browse files

yml and sphinx to build an empty rtd website

parent 61b2d0e4
No related branches found
No related tags found
No related merge requests found
Pipeline #78869 failed
image: python:3.9-slim-buster
pages:
stage: deploy
stages:
# --- Docker build stage ---
# The first stage contains jobs used to build
# docker images 'ready to use' for build/install.
# Requirement for jobs in this stage :
# - should build and push a docker image to siconos project registry
# - should be allowed to failed (in order to avoid blocking of last stage jobs)
# - should run only when commit message contains [docker build]
# - use Dockerfile from ci_gitlab/dockerfiles/<image-name>
#
- docker-build
# --- Doc stages ---
# Build documentation (run doxygen, sphinx, ...)
- doc-build
# Publish html pages
- doc-deploy
ubuntu20.4-doc:docker-build:
variables:
IMAGE_NAME: ubuntu20.04-doc
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
variables:
GIT_STRATEGY: clone
stage: docker-build
script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- sed -i "s|REGISTRY_PATH|$CI_PROJECT_PATH|g" $CI_PROJECT_DIR/ci/Dockerfile
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile ci/Dockerfile --destination $CI_REGISTRY_IMAGE/$IMAGE_NAME:latest
rules:
- if: $CI_COMMIT_MESSAGE =~ /^\[docker-build\]/
when: always
- when: never
# --- Build doc/web site and publish it ---
doc:build:
variables:
IMAGE_NAME: $CI_REGISTRY_IMAGE/ubuntu20.04-doc
script:
- pip install -U sphinx
- pip install sphinx_rtd_theme
- pip install recommonmark
- sphinx-build -d _public/doctrees docs/ _build/html
- mv _build/html/* public
- sphinx-build -b html -d build/doctrees docs/ build
artifacts:
paths:
- build/
pages:
image: python:alpine
script:
- mv build public
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
stage: doc-deploy
needs: ["doc:build"]
FROM ubuntu:20.04
ENV TZ=Europe/Paris
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && apt update && apt install -y -qq \
ntp \
git-core \
make \
vim \
libpython3-dev \
python3 \
python3-pip \
python3-packaging \
graphviz doxygen texlive-latex-base && apt autoclean -y && apt autoremove -y&& rm -rf /var/lib/apt/lists/*
WORKDIR /home
COPY requirements4doc.txt /home
RUN pip3 install -U -r /home/requirements4doc.txt
sphinx-rtd-theme
sphinxcontrib-bibtex
sphinxcontrib-websupport
sphinx-rtd-theme
# 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 = 'hysop'
copyright = '2021, hysop team'
author = 'hysop team'
# The full version, including alpha/beta/rc tags
release = '1.0.0'
# -- 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 = []
# -- 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']
\ No newline at end of file
.. hysop documentation master file, created by
sphinx-quickstart on Thu Nov 4 13:58:20 2021.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to hysop's documentation!
=================================
.. toctree::
:maxdepth: 2
:caption: Contents:
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment