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

fix(ci): update to Ansys actions v8 #517

Merged
merged 3 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
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 }}
jorgepiloto marked this conversation as resolved.
Show resolved Hide resolved

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
Loading