Skip to content

Commit

Permalink
fix(ci): update to Ansys actions v8 (#517)
Browse files Browse the repository at this point in the history
Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com>
  • Loading branch information
jorgepiloto and pyansys-ci-bot authored Oct 1, 2024
1 parent e2524e3 commit 07dc6d2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 58 deletions.
69 changes: 11 additions & 58 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ env:
MAIN_PYTHON_VERSION : '3.10'
PACKAGE_NAME: 'ansys_sphinx_theme'
DOCUMENTATION_CNAME: 'sphinxdocs.ansys.com'
MEILISEARCH_API_KEY: ${{ secrets.MEILISEARCH_API_KEY }}
MEILISEARCH_PUBLIC_API_KEY: ${{ secrets.MEILISEARCH_PUBLIC_API_KEY }}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -26,7 +24,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Run Ansys code style checks"
uses: ansys/actions/code-style@v7
uses: ansys/actions/code-style@v8
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}

Expand All @@ -35,7 +33,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Run Ansys documentation style checks"
uses: ansys/actions/doc-style@v7
uses: ansys/actions/doc-style@v8
with:
token: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -47,7 +45,7 @@ jobs:
contents: write
pull-requests: write
steps:
- uses: ansys/actions/doc-deploy-changelog@v7
- uses: ansys/actions/doc-deploy-changelog@v8
with:
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}

Expand All @@ -57,7 +55,7 @@ jobs:
needs: doc-style
steps:
- name: "Run Ansys documentation building action"
uses: ansys/actions/doc-build@v7
uses: ansys/actions/doc-build@v8
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
add-pdf-html-docs-as-assets: true
Expand All @@ -71,7 +69,7 @@ jobs:
needs: build-library
steps:
- name: "Deploy developers documentation"
uses: ansys/actions/doc-deploy-dev@v7
uses: ansys/actions/doc-deploy-dev@v8
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -83,7 +81,7 @@ jobs:
needs: release
steps:
- name: "Deploy stable documentation"
uses: ansys/actions/doc-deploy-stable@v7
uses: ansys/actions/doc-deploy-stable@v8
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -105,7 +103,7 @@ jobs:
os: macos-latest
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: ${{ matrix.os }}
Expand All @@ -117,7 +115,7 @@ jobs:
needs: [doc-build, smoke-tests]
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 }}

Expand All @@ -129,65 +127,20 @@ jobs:
steps:

- name: "Release to the private PyPI repository"
uses: ansys/actions/release-pypi-private@v7
uses: ansys/actions/release-pypi-private@v8
with:
library-name: ${{ env.PACKAGE_NAME }}
twine-username: "__token__"
twine-token: ${{ secrets.PYANSYS_PYPI_PRIVATE_PAT }}

- name: "Release to the public 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 }}

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

doc-index-stable:
name: "Deploy stable docs index"
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
runs-on: ubuntu-latest
needs: doc-deploy-stable
steps:
- name: "Install Git and clone project"
uses: actions/checkout@v4

- name: "get version of library"
shell: bash
run: |
python -m pip install -e .
- name: Scrape the stable documentation to PyMeilisearch
run: |
VERSION=$(python -c "from ansys_sphinx_theme import __version__; print('.'.join(__version__.split('.')[:2]))")
VERSION_MEILI=$(python -c "from ansys_sphinx_theme 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: ansys-sphinx-theme-v${{ env.VERSION_MEILI }}
host-url: ${{ vars.MEILISEARCH_HOST_URL }}
api-key: ${{ env.MEILISEARCH_API_KEY }}
1 change: 1 addition & 0 deletions doc/changelog.d/517.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fix(ci): update to Ansys actions v8

0 comments on commit 07dc6d2

Please sign in to comment.