Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/build-html-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build HTML Docs
on:
pull_request:
types: [opened, reopened, synchronize, edited]
jobs:
tox-docs:
runs-on: ubuntu-latest
steps:
- uses: opentelekomcloud-infra/github-actions/.github/actions/tox-run-env@v1
with:
tox-env: docs

- name: Upload documentation preview
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
uses: opentelekomcloud-infra/github-actions/.github/actions/tox-upload-swift@v1
with:
docs_path: "doc/build/html"
docs_service: docs-on-docs
swift_container: "gh_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 }}
github_token: ${{ secrets.GITHUB_TOKEN }}
repo: ${{ github.repository }}
pr_number: ${{ github.event.pull_request.number }}
run_id: ${{ github.run_id }}
ci_platform: github
29 changes: 29 additions & 0 deletions .github/workflows/build-pdf-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build PDF Docs
on:
pull_request:
types: [opened, reopened, synchronize, edited]
jobs:
tox-pdf-docs:
runs-on: ubuntu-latest
steps:
- uses: opentelekomcloud-infra/github-actions/.github/actions/tox-run-env@v1
with:
tox-env: pdf-docs

- name: Upload documentation preview
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
uses: opentelekomcloud-infra/github-actions/.github/actions/tox-upload-swift@v1
with:
docs_path: "doc/build/pdf"
docs_service: docs-on-docs
swift_container: "gh_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 }}
github_token: ${{ secrets.GITHUB_TOKEN }}
repo: ${{ github.repository }}
pr_number: ${{ github.event.pull_request.number }}
run_id: ${{ github.run_id }}
ci_platform: github
4 changes: 1 addition & 3 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
sphinx>=2.0.0,!=2.1.0 # BSD
myst_parser
sphinx-revealjs

otcdocstheme<2.0.0 # Apache-2.0

Expand All @@ -11,4 +9,4 @@ otc-sphinx-directives>=0.1.0
sphinx-minify>=0.0.1 # Apache-2.0
git+https://gitea.eco.tsi-dev.otc-service.com/infra/otc-metadata-rework.git#egg=otc_metadata
setuptools
gitpython
gitpython
4 changes: 1 addition & 3 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
from datetime import datetime

extensions = [
'sphinx_revealjs',
'myst_parser',
'otcdocstheme',
'otc_sphinx_directives'
]
Expand Down Expand Up @@ -133,4 +131,4 @@
\newcommand{{\servicetitle}}{{{otcdocs_service_title}}}
''',
'sphinxsetup': 'hmargin={15mm,15mm}, vmargin={20mm,30mm}, marginpar=10mm'
}
}
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ commands =
rm -rf {toxinidir}/packages.txt
wget -O {toxinidir}/bindep.txt https://raw.githubusercontent.com/opentelekomcloud/otcdocstheme/main/bindep.txt
bash -c "bindep test -b -f {toxinidir}/bindep.txt > {toxinidir}/packages.txt || true"
bash -c 'if [ -s {toxinidir}/packages.txt ]; then if command -v apt &>/dev/null; then apt update && xargs apt install --no-install-recommends -y < {toxinidir}/packages.txt; fi; fi'
bash -c 'if [ -s {toxinidir}/packages.txt ]; then if command -v apt &>/dev/null; then sudo apt update && xargs sudo apt install --no-install-recommends -y < {toxinidir}/packages.txt; fi; fi'
bash -c 'if [ -s {toxinidir}/packages.txt ]; then if command -v dnf &>/dev/null; then dnf install -y $(cat {toxinidir}/packages.txt); fi; fi'

[doc8]
Expand Down
2 changes: 1 addition & 1 deletion zuul.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
merge-mode: squash-merge
default-branch: main
templates:
- helpcenter-base-jobs
- helpcenter-base-jobs-no-check
vars:
sphinx_pdf_files:
check:
Expand Down
Loading