[constellation] Deploy documentation

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
certbot_on_virtu
Yohann D'ANELLO 2021-04-02 09:18:46 +02:00
parent 9f165ad9be
commit 372344fa10
Signed by: _ynerant
GPG Key ID: 3A75C55819C8CF85
3 changed files with 28 additions and 0 deletions

View File

@ -17,6 +17,10 @@ service_nginx:
params:
- "alias {% if constellation.version == 'master' %}/var/lib/constellation/media/{% else %}/var/local/constellation/media/{% endif %}"
- filter: "/doc"
params:
- "alias /var/www/constellation-doc/"
- filter: "/"
params:
- "uwsgi_pass constellation"

View File

@ -13,3 +13,4 @@
roles:
- nginx
- constellation-front
- constellation-doc

View File

@ -0,0 +1,23 @@
---
- name: Install Sphinx and RTD theme
apt:
update_cache: true
install_recommends: false
name:
- python3-sphinx
- python3-sphinx-rtd-theme
register: apt_result
retries: 3
until: apt_result is succeeded
- name: Create documentation directory with good permissions
file:
path: /var/www/constellation-doc
state: directory
owner: www-data
group: www-data
mode: u=rwx,g=rwxs,o=rx
- name: Build HTML documentation
command: "sphinx-build -b dirhtml {{ project_path }}/docs/ /var/www/constellation-doc/"
become_user: www-data