Doc Build Dev Nightly #682
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Doc Build Dev Nightly | |
| on: | |
| schedule: # UTC at 0500 | |
| - cron: "0 5 * * *" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| packages: read | |
| pull-requests: read | |
| issues: read | |
| env: | |
| DOCUMENTATION_CNAME: "fluent.docs.pyansys.com" | |
| FLUENT_STABLE_IMAGE: ${{ vars.FLUENT_STABLE_IMAGE_DEV }} | |
| DOC_DEPLOYMENT_IMAGE_TAG: v26.1.0 | |
| ANSYSLMD_LICENSE_FILE: ${{ format('1055@{0}', secrets.LICENSE_SERVER) }} | |
| PYFLUENT_TIMEOUT_FORCE_EXIT: 30 | |
| PYFLUENT_LAUNCH_CONTAINER: 1 | |
| PYFLUENT_LOGGING: "DEBUG" | |
| PYFLUENT_WATCHDOG_DEBUG: "OFF" | |
| PYFLUENT_HIDE_LOG_SECRETS: 1 | |
| PYFLUENT_SKIP_API_UPGRADE_ADVICE: 1 | |
| jobs: | |
| build_dev_docs: | |
| name: "Build Documentation" | |
| runs-on: [self-hosted, pyfluent] | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Python | |
| uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 | |
| with: | |
| python-version: "3.11" | |
| - name: Install OS packages | |
| run: | | |
| sudo apt update | |
| sudo apt-get install pandoc libegl1 make xvfb libfontconfig1 libxrender1 libxkbcommon-x11-0 -y | |
| - name: Install pyfluent | |
| run: make install | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 | |
| with: | |
| registry: ghcr.io | |
| username: ansys-bot | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Pull Fluent docker image | |
| run: make docker-pull | |
| env: | |
| FLUENT_IMAGE_TAG: ${{ env.FLUENT_STABLE_IMAGE }} | |
| - name: Run API codegen | |
| run: make api-codegen | |
| env: | |
| FLUENT_IMAGE_TAG: ${{ env.FLUENT_STABLE_IMAGE }} | |
| - name: Install again after codegen | |
| run: | | |
| rm -rf dist | |
| make install > /dev/null | |
| - name: Execute exhaust_system_settings_api.py | |
| run: | | |
| python examples/00-fluent/exhaust_system_settings_api.py | |
| env: | |
| FLUENT_IMAGE_TAG: ${{ env.FLUENT_STABLE_IMAGE }} | |
| PYFLUENT_CONTAINER_INSECURE_MODE: 1 | |
| - name: Execute external_compressible_flow.py | |
| run: | | |
| python examples/00-fluent/external_compressible_flow.py | |
| env: | |
| FLUENT_IMAGE_TAG: ${{ env.FLUENT_STABLE_IMAGE }} | |
| PYFLUENT_CONTAINER_INSECURE_MODE: 1 | |
| - name: Execute mixing_elbow_settings_api.py | |
| run: | | |
| python examples/00-fluent/mixing_elbow_settings_api.py | |
| env: | |
| FLUENT_IMAGE_TAG: ${{ env.FLUENT_STABLE_IMAGE }} | |
| PYFLUENT_CONTAINER_INSECURE_MODE: 1 | |
| - name: Execute modeling_cavitation.py | |
| run: | | |
| python examples/00-fluent/modeling_cavitation.py | |
| env: | |
| FLUENT_IMAGE_TAG: ${{ env.FLUENT_STABLE_IMAGE }} | |
| PYFLUENT_CONTAINER_INSECURE_MODE: 1 | |
| - name: Execute species_transport.py | |
| run: | | |
| python examples/00-fluent/species_transport.py | |
| env: | |
| FLUENT_IMAGE_TAG: ${{ env.FLUENT_STABLE_IMAGE }} | |
| PYFLUENT_CONTAINER_INSECURE_MODE: 1 | |
| - name: Build All Documentation | |
| run: | | |
| pip install -r requirements/requirements_build.txt | |
| pip install ansys-fluent-core[docs,reader,tests] | |
| make build-all-docs | |
| env: | |
| FLUENT_IMAGE_TAG: ${{ env.DOC_DEPLOYMENT_IMAGE_TAG }} | |
| BUILD_ALL_DOCS: 1 | |
| - name: Zip HTML Documentation before upload | |
| env: | |
| DOC_DEPLOYMENT_IMG: ${{ env.DOC_DEPLOYMENT_IMAGE_TAG }} | |
| run: | | |
| sudo apt install zip -y | |
| pushd doc/_build/html | |
| zip -r ../../../HTML-Documentation-tag-${DOC_DEPLOYMENT_IMG}.zip . | |
| popd | |
| - name: Upload HTML Documentation | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: HTML-Documentation-tag-${{ env.DOC_DEPLOYMENT_IMAGE_TAG }} | |
| path: HTML-Documentation-tag-${{ env.DOC_DEPLOYMENT_IMAGE_TAG }}.zip | |
| retention-days: 7 | |
| - name: Remove all docker images | |
| if: always() | |
| run: make docker-clean-images | |
| deploy_dev_docs: | |
| name: "Deploy Documentation" | |
| runs-on: public-ubuntu-latest-8-cores | |
| needs: [build_dev_docs] | |
| if: github.ref == 'refs/heads/main' | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: "Deploy development documentation" | |
| uses: ansys/actions/[email protected] | |
| with: | |
| doc-artifact-name: "HTML-Documentation-tag-${{ env.DOC_DEPLOYMENT_IMAGE_TAG }}" | |
| decompress-artifact: true | |
| cname: ${{ env.DOCUMENTATION_CNAME }} | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }} | |
| bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }} |