added docs to CI pipeline
This commit is contained in:
parent
fa1309b87f
commit
d3a75b5f95
27
.drone.yml
27
.drone.yml
@ -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
3
docs/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM nginx:latest
|
||||
|
||||
COPY _build/html/ /usr/share/nginx/html
|
@ -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 = []
|
Reference in New Issue
Block a user