Skip to content
Merged
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
34 changes: 21 additions & 13 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
env:
MAIN_PYTHON_VERSION: '3.7'
DOC_PYTHON_VERSION: '3.9'
DOCUMENTATION_CNAME: 'rep.docs.pyansys.com'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -37,7 +38,7 @@ jobs:
name: Quick tests and coverage
runs-on: ${{ matrix.os }}
strategy:
# max 1 job at a time running against the server to make it more robust
# max 1 job at a time running against the server to make it more robust
max-parallel: 1
matrix:
os: [ubuntu-latest]
Expand Down Expand Up @@ -84,7 +85,7 @@ jobs:
working-directory: ./rep-deployments/docker-compose

- name: Test with tox
run: tox -e ${{ matrix.cfg.toxenv }}-noeval-coverage
run: tox -e ${{ matrix.cfg.toxenv }}-noeval-coverage
env:
REP_TEST_URL: https://localhost:8443/rep
REP_TEST_USERNAME: repadmin
Expand All @@ -95,7 +96,7 @@ jobs:
if: always()
with:
report_paths: '**/test*.xml'
check_name: Test Report ${{ matrix.os }}:${{ matrix.cfg.python-version }}
check_name: Test Report ${{ matrix.os }}:${{ matrix.cfg.python-version }}

docs:
name: Documentation
Expand All @@ -112,17 +113,24 @@ jobs:
python -m pip install --upgrade pip setuptools tox
- name: Generate the documentation with tox
run: tox -e doc
- name: Add gh-pages parameters
run: |
touch build/sphinx/html/.nojekyll
echo "dev.rep.docs.pyansys.com" >> build/sphinx/html/CNAME
- name: Deploy Documentation
if: github.ref == 'refs/heads/main'
uses: JamesIves/github-pages-deploy-action@4.1.4
- name: Upload HTML Documentation
uses: actions/upload-artifact@v2
with:
name: documentation-html
path: build/sphinx/html
retention-days: 7

upload_dev_docs:
name: "Upload dev documentation"
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: [docs]
steps:
- name: Deploy the latest documentation
uses: pyansys/actions/doc-deploy-dev@v2
with:
branch: gh-pages
folder: build/sphinx/html
clean: true
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}

build:
name: Build and publish library
Expand Down
9 changes: 9 additions & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os
import sys

from ansys_sphinx_theme import get_version_match
from ansys_sphinx_theme import pyansys_logo_black as logo

from ansys.rep.client import __company__, __external_version__, __version__, __version_no_dots__
Expand All @@ -16,6 +17,9 @@
copyright = f"(c) {datetime.now().year} ANSYS, Inc. All rights reserved"
author = __company__

cname = os.getenv("DOCUMENTATION_CNAME", "rep.docs.pyansys.com")
"""The canonical name of the webpage hosting the documentation."""

# The short X.Y version
release = version = __version__

Expand Down Expand Up @@ -123,6 +127,11 @@
],
"collapse_navigation": True,
"navigation_depth": 4,
"switcher": {
"json_url": f"https://{cname}/release/versions.json",
"version_match": get_version_match(__version__),
},
"navbar_end": ["version-switcher", "theme-switcher", "navbar-icon-links"],
}

# A shorter title for the navigation bar. Default is the same as html_title.
Expand Down