diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 000000000..76c0a5e05 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,57 @@ +name: Release Docs + +on: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + DOCUMENTATION_CNAME: 'dynamicreporting.docs.pyansys.com' + MAIN_PYTHON_VERSION: '3.13' + PACKAGE_NAME: 'ansys-dynamicreporting-core' + PACKAGE_NAMESPACE: 'ansys.dynamicreporting.core' + +jobs: + docs: + name: Build docs + runs-on: ubuntu-latest + steps: + - name: Run Ansys documentation building action + uses: ansys/actions/doc-build@v10 + with: + python-version: ${{ env.MAIN_PYTHON_VERSION }} + check-links: false + sphinxopts: '-j auto' + + upload_docs_release: + name: Upload release documentation + if: github.event_name == 'push' && contains(github.ref, 'refs/tags') + runs-on: ubuntu-latest + needs: [ docs ] + steps: + - name: Deploy the stable documentation + uses: ansys/actions/doc-deploy-stable@v10 + if: ${{ !env.ACT }} + with: + cname: ${{ env.DOCUMENTATION_CNAME }} + token: ${{ secrets.GITHUB_TOKEN }} + bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }} + bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }} + + ci-failure: + name: Teams notify on failure + if: failure() && (github.event_name == 'pull_request' || github.ref == 'refs/heads/main' || github.ref_type == 'tag') + needs: [ docs, upload_docs_release ] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Microsoft Teams Notification + uses: jdcargile/ms-teams-notification@v1.4 + with: + github-token: ${{ github.token }} + ms-teams-webhook-uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI_CI }} + notification-summary: Release documentation build failure + notification-color: dc3545 + timezone: America/New_York