Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build(deps): Bump ansys/actions from 7 to 8 in the actions group #712

Merged
merged 5 commits into from
Oct 1, 2024
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
74 changes: 16 additions & 58 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ env:
PACKAGE_NAMESPACE: pyansys
MAIN_PYTHON_VERSION: '3.11'
DOCUMENTATION_CNAME: "docs.pyansys.com"
MEILISEARCH_API_KEY: ${{ secrets.MEILISEARCH_API_KEY }}
MEILISEARCH_PUBLIC_API_KEY: ${{ secrets.MEILISEARCH_PUBLIC_API_KEY }}

jobs:
check-vulnerabilities:
Expand All @@ -27,7 +25,7 @@ jobs:
steps:
- name: PyAnsys Vulnerability Check (on PRs)
if: github.event_name == 'pull_request'
uses: ansys/actions/check-vulnerabilities@v7
uses: ansys/actions/check-vulnerabilities@v8
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
python-package-name: ${{ env.PACKAGE_NAME }}
Expand All @@ -36,7 +34,7 @@ jobs:

- name: PyAnsys Vulnerability Check (any other case)
if: github.event_name != 'pull_request'
uses: ansys/actions/check-vulnerabilities@v7
uses: ansys/actions/check-vulnerabilities@v8
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
python-package-name: ${{ env.PACKAGE_NAME }}
Expand All @@ -57,7 +55,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: PyAnsys documentation style checks
uses: ansys/actions/doc-style@v7
uses: ansys/actions/doc-style@v8
with:
token: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -127,7 +125,7 @@ jobs:

steps:
- name: Build wheelhouse and perform smoke test
uses: ansys/actions/build-wheelhouse@v7
uses: ansys/actions/build-wheelhouse@v8
with:
library-name: ${{ env.PACKAGE_NAME }}
operating-system: ${{ runner.os }}
Expand All @@ -153,7 +151,7 @@ jobs:

steps:
- name: Build documentation
uses: ansys/actions/doc-build@v7
uses: ansys/actions/doc-build@v8
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
dependencies: "build-essential zip pandoc texlive-latex-extra latexmk texlive-pstricks"
Expand All @@ -165,37 +163,25 @@ jobs:
needs: [package]
steps:
- name: Deploy the latest documentation
uses: ansys/actions/doc-deploy-dev@v7
uses: ansys/actions/doc-deploy-dev@v8
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}

adapt-landing-page-dev:
uses: ./.github/workflows/update-gh-pages.yml
needs: [doc-deploy-dev]
secrets: inherit

doc-index-dev:
name: "Deploy dev docs index"
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: [doc-deploy-dev]
steps:
- name: "Deploy the dev documentation index"
uses: ansys/actions/doc-deploy-index@v7
with:
cname: ${{ env.DOCUMENTATION_CNAME }}/version/dev
index-name: pyansys-vdev
host-url: ${{ vars.MEILISEARCH_HOST_URL }}
api-key: ${{ env.MEILISEARCH_API_KEY }}

package:
name: Package library
runs-on: ubuntu-latest
needs: [docs-build, smoke-tests-core]
steps:
- name: Build library source and wheel artifacts
uses: ansys/actions/build-library@v7
uses: ansys/actions/build-library@v8
with:
library-name: ${{ env.PACKAGE_NAME }}
python-version: ${{ env.MAIN_PYTHON_VERSION }}
Expand All @@ -207,14 +193,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Release to PyPI repository
uses: ansys/actions/release-pypi-public@v7
uses: ansys/actions/release-pypi-public@v8
with:
library-name: ${{ env.PACKAGE_NAME }}
twine-username: __token__
twine-token: ${{ secrets.PYPI_TOKEN }}

- name: Release to GitHub
uses: ansys/actions/release-github@v7
uses: ansys/actions/release-github@v8
with:
library-name: ${{ env.PACKAGE_NAME }}
additional-artifacts: 'all-deps-Linux-3.10 all-deps-Linux-3.11 all-deps-Linux-3.12 all-deps-Windows-3.10 all-deps-Windows-3.11 all-deps-Windows-3.12 all-deps-macOS-3.10 all-deps-macOS-3.11 all-deps-macOS-3.12'
Expand All @@ -225,42 +211,14 @@ jobs:
needs: [release]
steps:
- name: Deploy the latest release documentation
uses: ansys/actions/doc-deploy-stable@v7
uses: ansys/actions/doc-deploy-stable@v8
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}

adapt-landing-page-release:
uses: ./.github/workflows/update-gh-pages.yml
needs: [docs-release]
secrets: inherit

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

- name: "Install the library to get the version"
shell: bash
run: |
python -m pip install -e .

- name: "Get the version of the library"
run: |
VERSION=$(python -c "from ${{ env.PACKAGE_NAMESPACE }} import __version__; print('.'.join(__version__.split('.')[:2]))")
VERSION_MEILI=$(python -c "from ${{ env.PACKAGE_NAMESPACE }} import __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@v7
with:
cname: ${{ env.DOCUMENTATION_CNAME }}/version/${{ env.VERSION }}
index-name: pyansys-v${{ env.VERSION_MEILI }}
host-url: ${{ vars.MEILISEARCH_HOST_URL }}
api-key: ${{ env.MEILISEARCH_API_KEY }}
12 changes: 5 additions & 7 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import os
import subprocess

from ansys_sphinx_theme import ansys_favicon, convert_version_to_pymeilisearch, get_version_match
from ansys_sphinx_theme import ansys_favicon, get_version_match
import sphinx
from sphinx.builders.latex import LaTeXBuilder

Expand All @@ -17,7 +17,6 @@
author = "ANSYS Inc."
cname = os.getenv("DOCUMENTATION_CNAME", default="nocname.com")
switcher_version = get_version_match(pyansys_version)
meilisearch_version = convert_version_to_pymeilisearch(pyansys_version)

# get the PyAnsys version
release = version = pyansys_version
Expand Down Expand Up @@ -65,11 +64,10 @@
"version_match": switcher_version,
},
"check_switcher": False,
"use_meilisearch": {
"api_key": os.getenv("MEILISEARCH_PUBLIC_API_KEY", ""),
"index_uids": {
f"pyansys-v{meilisearch_version}": "PyAnsys",
},
"static_search": {
"threshold": 0.5,
"min_chars_for_search": 2,
"ignoreLocation": True,
},
}

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ all = [
]
doc = [
"Sphinx==8.0.2",
"ansys-sphinx-theme==1.0.11",
"ansys-sphinx-theme==1.1.1",
"Jinja2 ==3.1.4",
"Pillow==10.4.0",
"PyGithub==2.4.0",
Expand Down
Loading