forked from docs/doc-exports
add title and change dir for result
Reviewed-by: gtema <artem.goncharov@gmail.com> Co-authored-by: Goncharov, Artem argoncha <artem.goncharov@t-systems.com> Co-committed-by: Goncharov, Artem argoncha <artem.goncharov@t-systems.com>
This commit is contained in:
parent
d30453af0d
commit
1065be13f8
@ -22,13 +22,14 @@
|
||||
- name: Configure git user email
|
||||
command: "git config --global user.email otcbot@otc-service.com"
|
||||
|
||||
- name: Generate new RSTs
|
||||
- name: Generate RSTs
|
||||
include_role:
|
||||
name: "convert_doc"
|
||||
vars:
|
||||
doc_label: "{{ doc.label }}"
|
||||
dest: "{{ ansible_user_dir }}/{{ docs_rst_location }}/{{ doc.label }}/{{ docs_new_location }}"
|
||||
dest: "{{ ansible_user_dir }}/{{ doc.repository }}/{{ doc.project_location }}"
|
||||
source: "{{ zuul.project.src_dir }}/{{ doc.html_location }}"
|
||||
title: "{{ doc.title | default(omit) }}"
|
||||
loop: "{{ docs }}"
|
||||
loop_control:
|
||||
loop_var: "doc"
|
||||
|
@ -1 +1,2 @@
|
||||
zuul_work_virtualenv: "{{ ansible_user_dir }}/.venv"
|
||||
convert_params: ""
|
||||
|
@ -1,7 +1,17 @@
|
||||
- name: Emit pandoc version
|
||||
command: "pandoc --version"
|
||||
|
||||
- name: Add destination to parameters
|
||||
ansible.builtin.set_fact:
|
||||
convert_params: "{{ convert_params }} --dest {{ dest }}"
|
||||
when: "dest is defined"
|
||||
|
||||
- name: Add title to parameters
|
||||
ansible.builtin.set_fact:
|
||||
convert_params: "{{ convert_params }} --title '{{ title }}'"
|
||||
when: "title is defined"
|
||||
|
||||
- name: Convert {{ doc_label | default('') }} HTML to RST
|
||||
args:
|
||||
executable: "/bin/bash"
|
||||
shell: "source {{ zuul_work_virtualenv }}/bin/activate; otc-convert-doc --dest {{ dest }} {{ source }}"
|
||||
ansible.builtin.shell: "source {{ zuul_work_virtualenv }}/bin/activate; otc-convert-doc {{ convert_params }} {{ source }}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user