|
| 1 | +name: Release Docs |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + |
| 6 | +concurrency: |
| 7 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 8 | + cancel-in-progress: true |
| 9 | + |
| 10 | +env: |
| 11 | + DOCUMENTATION_CNAME: 'dynamicreporting.docs.pyansys.com' |
| 12 | + MAIN_PYTHON_VERSION: '3.13' |
| 13 | + PACKAGE_NAME: 'ansys-dynamicreporting-core' |
| 14 | + PACKAGE_NAMESPACE: 'ansys.dynamicreporting.core' |
| 15 | + |
| 16 | +jobs: |
| 17 | + docs: |
| 18 | + name: Build docs |
| 19 | + runs-on: ubuntu-latest |
| 20 | + steps: |
| 21 | + - name: Run Ansys documentation building action |
| 22 | + uses: ansys/actions/doc-build@v10 |
| 23 | + with: |
| 24 | + python-version: ${{ env.MAIN_PYTHON_VERSION }} |
| 25 | + check-links: false |
| 26 | + sphinxopts: '-j auto' |
| 27 | + |
| 28 | + upload_docs_release: |
| 29 | + name: Upload release documentation |
| 30 | + if: github.event_name == 'push' && contains(github.ref, 'refs/tags') |
| 31 | + runs-on: ubuntu-latest |
| 32 | + needs: [ docs ] |
| 33 | + steps: |
| 34 | + - name: Deploy the stable documentation |
| 35 | + uses: ansys/actions/doc-deploy-stable@v10 |
| 36 | + if: ${{ !env.ACT }} |
| 37 | + with: |
| 38 | + cname: ${{ env.DOCUMENTATION_CNAME }} |
| 39 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 40 | + bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }} |
| 41 | + bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }} |
| 42 | + |
| 43 | + ci-failure: |
| 44 | + name: Teams notify on failure |
| 45 | + if: failure() && (github.event_name == 'pull_request' || github.ref == 'refs/heads/main' || github.ref_type == 'tag') |
| 46 | + needs: [ docs, upload_docs_release ] |
| 47 | + runs-on: ubuntu-latest |
| 48 | + steps: |
| 49 | + - uses: actions/checkout@v4 |
| 50 | + - name: Microsoft Teams Notification |
| 51 | + |
| 52 | + with: |
| 53 | + github-token: ${{ github.token }} |
| 54 | + ms-teams-webhook-uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI_CI }} |
| 55 | + notification-summary: Release documentation build failure |
| 56 | + notification-color: dc3545 |
| 57 | + timezone: America/New_York |
0 commit comments