diff --git a/otc_metadata/templates/build-html-docs.yaml.j2 b/otc_metadata/templates/build-html-docs.yaml.j2
index 7caf80b..728c4e3 100644
--- a/otc_metadata/templates/build-html-docs.yaml.j2
+++ b/otc_metadata/templates/build-html-docs.yaml.j2
@@ -6,12 +6,21 @@ jobs:
tox-docs:
runs-on: ubuntu-latest
steps:
+ {%- if environment == 'internal' %}
- uses: https://github.com/opentelekomcloud-infra/github-actions/.github/actions/tox-run-env@v1
with:
tox-env: docs
- name: Upload documentation preview
uses: https://github.com/opentelekomcloud-infra/github-actions/.github/actions/tox-upload-swift@v1
+ {%- elif environment == 'public' %}
+ - uses: opentelekomcloud-infra/github-actions/.github/actions/tox-run-env@v1
+ with:
+ tox-env: docs
+
+ - name: Upload documentation preview
+ uses: opentelekomcloud-infra/github-actions/.github/actions/tox-upload-swift@v1
+ {%- endif %}
with:
docs_path: "doc/build/html"
docs_service: {{ service_uri }}
diff --git a/otc_metadata/templates/build-pdf-docs.yaml.j2 b/otc_metadata/templates/build-pdf-docs.yaml.j2
index be56752..b683e56 100644
--- a/otc_metadata/templates/build-pdf-docs.yaml.j2
+++ b/otc_metadata/templates/build-pdf-docs.yaml.j2
@@ -6,12 +6,21 @@ jobs:
tox-pdf-docs:
runs-on: ubuntu-latest
steps:
+ {%- if environment == 'internal' %}
- uses: https://github.com/opentelekomcloud-infra/github-actions/.github/actions/tox-run-env@v1
with:
- tox-env: pdf-docs
+ tox-env: docs
- name: Upload documentation preview
uses: https://github.com/opentelekomcloud-infra/github-actions/.github/actions/tox-upload-swift@v1
+ {%- elif environment == 'public' %}
+ - uses: opentelekomcloud-infra/github-actions/.github/actions/tox-run-env@v1
+ with:
+ tox-env: docs
+
+ - name: Upload documentation preview
+ uses: opentelekomcloud-infra/github-actions/.github/actions/tox-upload-swift@v1
+ {%- endif %}
with:
docs_path: "doc/build/pdf"
docs_service: {{ service_uri }}