From e077eae6ed16e10b3f7cab1aa341041045976030 Mon Sep 17 00:00:00 2001 From: light7734 Date: Sat, 23 Aug 2025 13:38:34 +0330 Subject: [PATCH] ci: add documentation pipeline stage for development branch --- .drone.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/.drone.yml b/.drone.yml index 159dc65..9ae72e5 100644 --- a/.drone.yml +++ b/.drone.yml @@ -87,3 +87,37 @@ steps: pull: if-not-exists commands: - ./tools/ci/static_analysis/clang_format.sh + +--- +kind: pipeline +type: docker +name: documentation + +trigger: + branch: + - main + +steps: +- name: build and deploy + image: documentation:latest + commands: + # Build docs + - pwd + - cd docs + - mkdir generated + - touch generated/changelogs.rst + - touch generated/api.rst + - sphinx-build -M html . . + + - mv ./html light_docs_dev_staging + + # Stage + - ssh -tt 'light@5.75.206.84' 'sudo rm -rf /home/light/light_docs_dev_staging' + - scp -r './light_docs_dev_staging' 'light@5.75.206.84:/home/light/' + + # Move to endpoint + - ssh -tt 'light@5.75.206.84' 'sudo rm -rf /home/light/light_docs_dev/*' + - ssh -tt 'light@5.75.206.84' 'sudo mv /home/light/light_docs_dev_staging/* /home/light/light_docs_dev/' + + # Remove staging + - ssh -tt 'light@5.75.206.84' 'sudo rm -rf /home/light/light_docs_dev_staging'