added docs to CI pipeline
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Pünkösd Marcell 2020-04-08 21:54:04 +02:00
parent fa1309b87f
commit d3a75b5f95
3 changed files with 29 additions and 7 deletions

View File

@ -30,12 +30,31 @@ steps:
- docker push "$DOCKER_USERNAME/consumer_api"
- docker push "$DOCKER_USERNAME/consumer_api:$DRONE_BUILD_NUMBER"
- name: build_docs
image: python:3
- name: make_docs
image: python:3.8
commands:
- pip3 install Sphinx
- pip3 install Sphinx sphinx_rtd_theme
- pip3 install -r requirements.txt
- sphinx-quickstart
- cd docs
- make html
- name: build_docs
image: docker:stable-dind
volumes:
- name: dockersock
path: /var/run
environment:
DOCKER_USERNAME:
from_secret: DOCKER_USERNAME
DOCKER_PASSWORD:
from_secret: DOCKER_PASSWORD
commands:
- cd docs
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker build -t="$DOCKER_USERNAME/consumer-api-docs" .
- docker build -t="$DOCKER_USERNAME/consumer-api-docs:$DRONE_BUILD_NUMBER" .
- docker push "$DOCKER_USERNAME/consumer-api-docs"
- docker push "$DOCKER_USERNAME/consumer-api-docs:$DRONE_BUILD_NUMBER"
- name: slack
image: plugins/slack

3
docs/Dockerfile Normal file
View File

@ -0,0 +1,3 @@
FROM nginx:latest
COPY _build/html/ /usr/share/nginx/html

View File

@ -34,7 +34,7 @@ extensions = [
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = []
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
@ -47,9 +47,9 @@ exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'
html_theme = 'sphinx_rtd_theme'
# 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']
html_static_path = []