diff --git a/.drone.yml b/.drone.yml index 281b879..8ac0dcd 100644 --- a/.drone.yml +++ b/.drone.yml @@ -30,12 +30,31 @@ steps: - docker push "$DOCKER_USERNAME/consumer-scheduler" - docker push "$DOCKER_USERNAME/consumer-scheduler:$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-scheduler-docs" . + - docker build -t="$DOCKER_USERNAME/consumer-scheduler-docs:$DRONE_BUILD_NUMBER" . + - docker push "$DOCKER_USERNAME/consumer-scheduler-docs" + - docker push "$DOCKER_USERNAME/consumer-scheduler-docs:$DRONE_BUILD_NUMBER" - name: slack image: plugins/slack diff --git a/docs/Dockerfile b/docs/Dockerfile new file mode 100644 index 0000000..691c92e --- /dev/null +++ b/docs/Dockerfile @@ -0,0 +1,3 @@ +FROM nginx:latest + +COPY _build/html/ /usr/share/nginx/html \ No newline at end of file