From 4f3acebb90cb180b960bd1be13026e5f9d0c19d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Wed, 8 Apr 2020 16:01:01 +0200 Subject: [PATCH] auto generate documentation --- .drone.yml | 22 ++++++++++++++++++++-- .gitignore | 1 + docs/Dockerfile | 3 +++ 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 docs/Dockerfile diff --git a/.drone.yml b/.drone.yml index 9838b6c..67f0e47 100644 --- a/.drone.yml +++ b/.drone.yml @@ -36,8 +36,8 @@ steps: - docker push "$DOCKER_USERNAME/producer" - docker push "$DOCKER_USERNAME/producer:$DRONE_BUILD_NUMBER" -- name: build_docs - image: python:3 +- name: make_docs + image: python:3.8 commands: - pip3 install Sphinx - pip3 install -r requirements.txt @@ -45,6 +45,24 @@ steps: - sphinx-apidoc -o source/ ../ - 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/producer-docs" . + - docker build -t="$DOCKER_USERNAME/producer-docs:$DRONE_BUILD_NUMBER" . + - docker push "$DOCKER_USERNAME/producer-docs" + - docker push "$DOCKER_USERNAME/producer-docs:$DRONE_BUILD_NUMBER" + - name: slack image: plugins/slack settings: diff --git a/.gitignore b/.gitignore index cf3c132..2e41a8c 100644 --- a/.gitignore +++ b/.gitignore @@ -131,3 +131,4 @@ dmypy.json #Pycharm .idea/ *.iml +docs/source/ diff --git a/docs/Dockerfile b/docs/Dockerfile new file mode 100644 index 0000000..ad93f6b --- /dev/null +++ b/docs/Dockerfile @@ -0,0 +1,3 @@ +FROM httpd:2.4 + +COPY _build/html/ /usr/local/apache2/htdocs/ \ No newline at end of file