Skip to content

Doc Build Dev Nightly #279

Doc Build Dev Nightly

Doc Build Dev Nightly #279

name: Doc Build Dev Nightly
on:
schedule: # UTC at 0500
- cron: '0 5 * * *'
workflow_dispatch:
env:
DOCUMENTATION_CNAME: 'fluent.docs.pyansys.com'
DOC_DEPLOYMENT_IMAGE_TAG: v25.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
PYFLUENT_CONTAINER_MOUNT_SOURCE: "/home/ansys/Downloads/ansys_fluent_core_examples"
jobs:
build_dev_docs:
runs-on: [self-hosted, pyfluent]
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
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@v3
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.DOC_DEPLOYMENT_IMAGE_TAG }}
- name: Run API codegen
run: make api-codegen
env:
FLUENT_IMAGE_TAG: ${{ env.DOC_DEPLOYMENT_IMAGE_TAG }}
- name: Install again after codegen
run: |
rm -rf dist
make install > /dev/null
- name: Build All Documentation
run: |
pip install -r requirements/requirements_build.txt
if [ -f poetry.lock ] ; then
rm poetry.lock
fi
poetry install --with docs
poetry install --all-extras
make build-all-docs
env:
FLUENT_IMAGE_TAG: ${{ env.DOC_DEPLOYMENT_IMAGE_TAG }}
- name: Zip HTML Documentation before upload
run: |
sudo apt install zip -y
pushd doc/_build/html
zip -r ../../../HTML-Documentation-tag-${{ env.DOC_DEPLOYMENT_IMAGE_TAG }}.zip .
popd
- name: Upload HTML Documentation
uses: actions/upload-artifact@v4
with:
name: HTML-Documentation-tag-${{ env.DOC_DEPLOYMENT_IMAGE_TAG }}
path: HTML-Documentation-tag-${{ env.DOC_DEPLOYMENT_IMAGE_TAG }}.zip
retention-days: 7
deploy_dev_docs:
runs-on: ubuntu-latest
needs: [build_dev_docs]
if: github.ref == 'refs/heads/main'
steps:
- name: "Deploy development documentation"
uses: ansys/actions/doc-deploy-dev@v8
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 }}