47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
- name: Create temporary HTML archive file
|
|
tempfile:
|
|
state: file
|
|
suffix: ".tar.gz"
|
|
register: html_archive
|
|
|
|
- name: Archive HTML
|
|
command: "tar -f {{ html_archive.path }} -C {{ zuul_work_dir }}/{{ sphinx_build_dir }}/html --exclude=.doctrees -cz ."
|
|
args:
|
|
warn: false
|
|
|
|
- name: Fetch archive HTML
|
|
synchronize:
|
|
dest: "{{ zuul.executor.log_root }}/docs-html.tar.gz"
|
|
mode: pull
|
|
src: "{{ html_archive.path }}"
|
|
verify_host: true
|
|
|
|
- name: Create browseable HTML directory
|
|
delegate_to: localhost
|
|
file:
|
|
path: "{{ zuul.executor.log_root }}/docs"
|
|
state: directory
|
|
|
|
- name: Extract archive HTML
|
|
delegate_to: localhost
|
|
unarchive:
|
|
src: "{{ zuul.executor.log_root }}/docs-html.tar.gz"
|
|
dest: "{{ zuul.executor.log_root }}/docs"
|
|
remote_src: true
|
|
extra_opts:
|
|
- "--no-same-owner"
|
|
|
|
- name: Return artifact to Zuul
|
|
zuul_return:
|
|
data:
|
|
zuul:
|
|
artifacts:
|
|
- name: "Docs archive"
|
|
url: "docs-html.tar.gz"
|
|
metadata:
|
|
type: docs_archive
|
|
- name: "Docs preview site"
|
|
url: "docs/"
|
|
metadata:
|
|
type: docs_site
|