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
15 changes: 15 additions & 0 deletions .github/workflows/nightly-dev-doc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ env:
PYFLUENT_LOGGING: 'DEBUG'
PYFLUENT_WATCHDOG_DEBUG: 'OFF'
PYFLUENT_HIDE_LOG_SECRETS: 1
MEILISEARCH_API_KEY: ${{ secrets.MEILISEARCH_API_KEY }}
MEILISEARCH_PUBLIC_API_KEY: ${{ secrets.MEILISEARCH_PUBLIC_API_KEY }}

jobs:
build_dev_docs:
Expand Down Expand Up @@ -82,3 +84,16 @@ jobs:
decompress-artifact: true
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}

doc-index-dev:
name: "Deploy dev index docs"
runs-on: ubuntu-latest
needs: deploy_dev_docs
steps:
- name: "Deploy the latest documentation index"
uses: ansys/actions/doc-deploy-index@v4
with:
cname: ${{ env.DOCUMENTATION_CNAME }}/version/dev
index-name: pyfluent-vdev
host-url: ${{ vars.MEILISEARCH_HOST_URL }}
api-key: ${{ env.MEILISEARCH_API_KEY }}
32 changes: 32 additions & 0 deletions .github/workflows/release-doc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ env:
PYFLUENT_LOGGING: 'DEBUG'
PYFLUENT_WATCHDOG_DEBUG: 'OFF'
PYFLUENT_HIDE_LOG_SECRETS: 1
MEILISEARCH_API_KEY: ${{ secrets.MEILISEARCH_API_KEY }}
MEILISEARCH_PUBLIC_API_KEY: ${{ secrets.MEILISEARCH_PUBLIC_API_KEY }}

jobs:
build_release_docs:
Expand Down Expand Up @@ -84,3 +86,33 @@ jobs:
decompress-artifact: true
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}

doc-index-stable:
name: "Deploy stable docs index"
runs-on: ubuntu-latest
needs: deploy_release_docs
steps:
- name: "Install Git and clone project"
uses: actions/checkout@v4

- name: "Get version of library"
shell: bash
run: |
echo "FULL_VERSION=$(cat VERSION)" >> $GITHUB_ENV

- name: "Scrape the stable documentation to PyMeilisearch"
run: |
VERSION=$(python -c "import os; version=os.environ['FULL_VERSION']; print('.'.join(version.split('.')[:2]))")
VERSION_MEILI=$(python -c "import os; version=os.environ['FULL_VERSION']; print('-'.join(version.split('.')[:2]))")
echo "Calculated VERSION: $VERSION"
echo "Calculated VERSION_MEILI: $VERSION_MEILI"
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "VERSION_MEILI=$VERSION_MEILI" >> $GITHUB_ENV

- name: "Deploy the latest documentation index"
uses: ansys/actions/doc-deploy-index@v4
with:
cname: ${{ env.DOCUMENTATION_CNAME }}/version/${{ env.VERSION }}
index-name: pyfluent-v${{ env.VERSION_MEILI }}
host-url: ${{ vars.MEILISEARCH_HOST_URL }}
api-key: ${{ env.MEILISEARCH_API_KEY }}
6 changes: 6 additions & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,12 @@ def _stop_fluent_container(gallery_conf, fname):
"json_url": f"https://{cname}/versions.json",
"version_match": get_version_match(__version__),
},
"use_meilisearch": {
"api_key": os.getenv("MEILISEARCH_PUBLIC_API_KEY", ""),
"index_uids": {
f"pyfluent-v{get_version_match(__version__).replace('.', '-')}": "PyFluent",
},
},
"navbar_end": ["version-switcher", "theme-switcher", "navbar-icon-links"],
"navigation_depth": -1,
"collapse_navigation": True,
Expand Down