Files
otc-metadata-rework/otc_metadata/templates/build-pdf-docs.yaml.j2
Sebastian Gode 64a18eedb5
All checks were successful
Run Tox Check / tox-py312 (pull_request) Successful in 18s
Run Tox Check / tox-pep8 (pull_request) Successful in 15s
gh-actions
2025-10-02 12:32:16 +00:00

55 lines
2.3 KiB
Django/Jinja

name: Build PDF Docs
on:
pull_request:
types: [opened, reopened, synchronize, edited]
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: 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 }}
{%- if environment == 'internal' %}
{% raw -%}
swift_container: "gitea_action_logs"
otc_swift_username: ${{ secrets.OTC_SWIFT_USERNAME }}
otc_swift_password: ${{ secrets.OTC_SWIFT_PASSWORD }}
otc_swift_project_name: ${{ secrets.OTC_SWIFT_PROJECT_NAME }}
otc_swift_domain: ${{ secrets.OTC_SWIFT_DOMAIN }}
otc_swift_endpoint: ${{ secrets.OTC_SWIFT_ENDPOINT }}
gitea_token: ${{ secrets.GITEA_TOKEN }}
gitea_server_url: ${{ gitea.server_url }}
repo: ${{ gitea.repository }}
pr_number: ${{ gitea.event.pull_request.number }}
run_id: ${{ gitea.run_id }}
{%- endraw %}
{%- elif environment == 'public' %}
{% raw -%}
swift_container: "github_action_logs"
otc_swift_username: ${{ secrets.OTC_SWIFT_USERNAME }}
otc_swift_password: ${{ secrets.OTC_SWIFT_PASSWORD }}
otc_swift_project_name: ${{ secrets.OTC_SWIFT_PROJECT_NAME }}
otc_swift_domain: ${{ secrets.OTC_SWIFT_DOMAIN }}
otc_swift_endpoint: ${{ secrets.OTC_SWIFT_ENDPOINT }}
gitea_token: ${{ secrets.GITHUB_TOKEN }}
gitea_server_url: ${{ github.server_url }}
repo: ${{ github.repository }}
pr_number: ${{ github.event.pull_request.number }}
run_id: ${{ github.run_id }}
{%- endraw %}
{%- endif %}