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
30 changes: 8 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ env:
# It applies 7 days retention policy by default.
RESET_EXAMPLES_CACHE: 6
API_CODE_CACHE: 3
DOCUMENTATION_CNAME: 'fluent.docs.pyansys.com'

jobs:
stylecheck:
Expand Down Expand Up @@ -116,15 +117,6 @@ jobs:
steps:
- uses: actions/checkout@v3

# used for documentation deployment
- name: Get Bot Application Token
if: github.event_name == 'push' && contains(github.ref, 'refs/tags') && matrix.image-tag == 'v23.1.0'
id: get_workflow_token
uses: peter-murray/workflow-application-token-action@v2
with:
application_id: ${{ secrets.BOT_APPLICATION_ID }}
application_private_key: ${{ secrets.BOT_APPLICATION_PRIVATE_KEY }}

- name: Setup Python
uses: actions/setup-python@v4
with:
Expand Down Expand Up @@ -206,17 +198,12 @@ jobs:
Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ steps.version.outputs.PYFLUENT_VERSION }}-${{ matrix.image-tag }}

- name: Build Documentation
run: make build-doc DOCS_CNAME=fluent.docs.pyansys.com
run: make build-doc
env:
ANSYSLMD_LICENSE_FILE: ${{ format('1055@{0}', secrets.LICENSE_SERVER) }}
PYFLUENT_START_INSTANCE: 0
FLUENT_IMAGE_TAG: ${{ matrix.image-tag }}

- name: Zip HTML Documentation before upload
run: |
sudo apt install zip -y
zip -r doc.zip doc/_build/html

- name: Upload HTML Documentation
if: matrix.image-tag == 'v23.1.0'
uses: actions/upload-artifact@v3
Expand All @@ -225,15 +212,14 @@ jobs:
path: doc.zip
retention-days: 7

- name: Deploy
- name: Deploy stable documentation
uses: pyansys/actions/doc-deploy-stable@v2
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, 'dev') && matrix.image-tag == 'v23.1.0'
uses: JamesIves/github-pages-deploy-action@v4.4.1
with:
repository-name: pyansys/pyfluent-docs
token: ${{ secrets.DOC_DEPLOYMENT_PAT }}
BRANCH: gh-pages
FOLDER: doc/_build/html
CLEAN: true
doc-artifact-name: 'HTML-Documentation-tag-${{ matrix.image-tag }}'
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}


build:
name: Build
Expand Down
23 changes: 15 additions & 8 deletions .github/workflows/nightly-doc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
- cron: '0 4 * * *'
workflow_dispatch:

env:
DOCUMENTATION_CNAME: 'fluent.docs.pyansys.com'

jobs:
nightly_docs_build:
runs-on: [self-hosted, pyfluent]
Expand Down Expand Up @@ -58,18 +61,22 @@ jobs:
FLUENT_IMAGE_TAG: ${{ matrix.image-tag }}

- name: Build Documentation
run: make build-doc DOCS_CNAME=dev.fluent.docs.pyansys.com
run: make build-doc
env:
ANSYSLMD_LICENSE_FILE: ${{ format('1055@{0}', secrets.LICENSE_SERVER) }}
PYFLUENT_START_INSTANCE: 0
FLUENT_IMAGE_TAG: ${{ matrix.image-tag }}

- name: Deploy
- name: Upload HTML documentation
if: matrix.image-tag == 'v23.1.0'
uses: JamesIves/github-pages-deploy-action@v4.4.1
uses: actions/upload-artifact@v3
with:
name: documentation-html
path: doc/_build/html
retention-days: 7

- name: "Deploy development documentation"
uses: pyansys/actions/doc-deploy-dev@v2
with:
repository-name: pyansys/pyfluent-dev-docs
token: ${{ secrets.DOC_DEPLOYMENT_PAT }}
BRANCH: gh-pages
FOLDER: doc/_build/html
CLEAN: true
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ build-doc:
@sudo rm -rf /home/ansys/.local/share/ansys_fluent_core/examples/*
@pip install -r requirements/requirements_doc.txt
@xvfb-run make -C doc html
@touch doc/_build/html/.nojekyll
@echo "$(DOCS_CNAME)" >> doc/_build/html/CNAME

compare-flobject:
@python .ci/compare_flobject.py
9 changes: 8 additions & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
"""Sphinx documentation configuration file."""
from datetime import datetime
import os
import platform
import subprocess

from ansys_sphinx_theme import ansys_favicon, pyansys_logo_black
from ansys_sphinx_theme import ansys_favicon, get_version_match, pyansys_logo_black
from sphinx_gallery.sorting import FileNameSortKey

import ansys.fluent.core as pyfluent
Expand All @@ -16,6 +17,7 @@
project = "ansys.fluent.core"
copyright = f"(c) {datetime.now().year} ANSYS, Inc. All rights reserved"
author = "ANSYS Inc."
cname = os.getenv("DOCUMENTATION_CNAME", "nocname.com")

# The short X.Y version
release = version = __version__
Expand Down Expand Up @@ -161,6 +163,11 @@ def _stop_fluent_container(gallery_conf, fname):
"additional_breadcrumbs": [
("PyAnsys", "https://docs.pyansys.com/"),
],
"switcher": {
"json_url": f"{cname}/release/versions.json",
"version_match": get_version_match(__version__),
},
"navbar_end": ["version-switcher", "theme-switcher", "navbar-icon-links"],
"navigation_depth": -1,
}

Expand Down
4 changes: 2 additions & 2 deletions requirements/requirements_doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Sphinx==5.3.0
jupyter_sphinx==0.4.0
numpydoc==1.5.0
matplotlib==3.6.2
ansys-sphinx-theme==0.7.2
ansys-sphinx-theme==0.8.0
pypandoc==1.10
pytest-sphinx==0.5.0
sphinx-autobuild==2021.3.14
Expand All @@ -11,4 +11,4 @@ sphinx-copybutton==0.5.1
sphinx-gallery==0.11.1
sphinx-notfound-page==0.8.3
sphinxcontrib-websupport==1.2.4
sphinxemoji==0.2.0
sphinxemoji==0.2.0