From a68f9bde36e80379384a0ce992f39269fdd7c47d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Morais?= Date: Mon, 25 Aug 2025 10:57:08 +0200 Subject: [PATCH 1/3] ci: pin actions version and cleanup workflow --- .github/workflows/ci_cd.yml | 89 +++++-------------------------------- 1 file changed, 10 insertions(+), 79 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 651cc29f..7a47ecad 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -27,7 +27,7 @@ jobs: runs-on: ubuntu-latest steps: - name: "Check documentation style" - uses: ansys/actions/doc-style@v10 + uses: ansys/actions/doc-style@1096998b81f7ebdea116b683e11f3a8bda759ca6 # v10.0.14 with: token: ${{ secrets.GITHUB_TOKEN }} @@ -36,7 +36,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Setup headless display - uses: pyvista/setup-headless-display-action@v4 + uses: pyvista/setup-headless-display-action@7d84ae825e6d9297a8e99bdbbae20d1b919a0b19 # v4.2 - name: "Install mermaid-cli" run: npm install -g @mermaid-js/mermaid-cli @@ -48,7 +48,7 @@ jobs: sudo apt-get install graphviz - name: "Build project documentation" - uses: ansys/actions/doc-build@v10 + uses: ansys/actions/doc-build@1096998b81f7ebdea116b683e11f3a8bda759ca6 # v10.0.14 with: python-version: ${{ env.MAIN_PYTHON_VERSION }} use-python-cache: false @@ -56,84 +56,15 @@ jobs: dependencies: 'texlive-latex-extra latexmk nodejs npm' doc-deploy: - name: "Deploy documentation" + name: Deploy documentation + if: github.ref == 'refs/heads/main' runs-on: ubuntu-latest - if: github.event_name == 'push' && !contains(github.ref, 'refs/tags') needs: doc-build steps: - - - name: "Download HTML documentation artifacts" - uses: actions/download-artifact@v5 + - name: Upload development documentation + uses: ansys/actions/doc-deploy-dev@1096998b81f7ebdea116b683e11f3a8bda759ca6 # v10.0.14 with: - name: documentation-html - path: documentation-html - - - uses: peaceiris/actions-gh-pages@v4 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: documentation-html - cname: ${{ env.DOCUMENTATION_CNAME }} - full_commit_message: ${{ github.event.head_commit.message }} - force_orphan: true - - release-github: - name: "Release to GitHub" - runs-on: ubuntu-latest - if: github.event_name == 'push' && contains(github.ref, 'refs/tags') - needs: doc-build - steps: - - - name: "Download HTML documentation" - uses: actions/download-artifact@v5 - with: - name: documentation-html - path: documentation-html - - - name: "Zip HTML documentation" - uses: vimtor/action-zip@v1 - with: - files: documentation-html - dest: documentation-html.zip - - - name: "Download PDF documentation" - uses: actions/download-artifact@v5 - with: - name: documentation-pdf - path: documentation-pdf - - - name: "Zip PDF documentation" - uses: vimtor/action-zip@v1 - with: - files: documentation-pdf - dest: documentation-pdf - - - name: "Display the structure of downloaded files" - shell: bash - run: ls -R - - - name: "Release to GitHub" - uses: softprops/action-gh-release@v2 - with: - files: | - documentation-html.zip - documentation-pdf - - doc-deploy-github-release: - name: "Deploy documentation (stable)" - runs-on: ubuntu-latest - needs: [release-github] - steps: - - - name: "Download HTML documentation artifacts" - uses: actions/download-artifact@v5 - with: - name: documentation-html - path: documentation-html - - - uses: peaceiris/actions-gh-pages@v4 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: documentation-html + bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }} + bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }} cname: ${{ env.DOCUMENTATION_CNAME }} - full_commit_message: ${{ github.event.head_commit.message }} - force_orphan: true + token: ${{ secrets.GITHUB_TOKEN }} From 2fa5670c9e299c2e4bebed3e762d1c8c38041228 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Morais?= Date: Mon, 25 Aug 2025 16:02:13 +0200 Subject: [PATCH 2/3] ci: revert use of ansys/actions/doc-deploy-dev --- .github/workflows/ci_cd.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 7a47ecad..1f279374 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -61,10 +61,17 @@ jobs: runs-on: ubuntu-latest needs: doc-build steps: - - name: Upload development documentation - uses: ansys/actions/doc-deploy-dev@1096998b81f7ebdea116b683e11f3a8bda759ca6 # v10.0.14 + + - name: Download HTML documentation artifacts + uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 + with: + name: documentation-html + path: documentation-html + + - uses: peaceiris/actions-gh-pages@v4 with: - bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }} - bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }} + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: documentation-html cname: ${{ env.DOCUMENTATION_CNAME }} - token: ${{ secrets.GITHUB_TOKEN }} + full_commit_message: ${{ github.event.head_commit.message }} + force_orphan: true From 2067b1b36273c9919604fddf8485ce36c8c110a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Morais?= Date: Mon, 25 Aug 2025 16:03:32 +0200 Subject: [PATCH 3/3] refactor: remove quotation mark --- .github/workflows/ci_cd.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 1f279374..97511ea6 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -23,31 +23,31 @@ permissions: jobs: doc-style: - name: "Check documentation style" + name: Check documentation style runs-on: ubuntu-latest steps: - - name: "Check documentation style" + - name: Check documentation style uses: ansys/actions/doc-style@1096998b81f7ebdea116b683e11f3a8bda759ca6 # v10.0.14 with: token: ${{ secrets.GITHUB_TOKEN }} doc-build: - name: "Build project documentation" + name: Build project documentation runs-on: ubuntu-22.04 steps: - name: Setup headless display uses: pyvista/setup-headless-display-action@7d84ae825e6d9297a8e99bdbbae20d1b919a0b19 # v4.2 - - name: "Install mermaid-cli" + - name: Install mermaid-cli run: npm install -g @mermaid-js/mermaid-cli - - name: "Install GraphViz" + - name: Install GraphViz shell: bash run: | sudo apt-get update sudo apt-get install graphviz - - name: "Build project documentation" + - name: Build project documentation uses: ansys/actions/doc-build@1096998b81f7ebdea116b683e11f3a8bda759ca6 # v10.0.14 with: python-version: ${{ env.MAIN_PYTHON_VERSION }}