Nightly Documentation Build #998
This file contains 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: Nightly Documentation Build | |
on: | |
workflow_dispatch: | |
schedule: # UTC at 0400 | |
- cron: '0 4 * * *' | |
env: | |
ANSYSLMD_LICENSE_FILE: ${{ format('1055@{0}', secrets.LICENSE_SERVER) }} | |
DOCUMENTATION_CNAME: 'aedt.docs.pyansys.com' | |
MEILISEARCH_API_KEY: ${{ secrets.MEILISEARCH_API_KEY }} | |
MEILISEARCH_PUBLIC_API_KEY: ${{ secrets.MEILISEARCH_PUBLIC_API_KEY }} | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
docs_build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install pyaedt | |
run: | | |
pip install . | |
- name: Install doc build requirements | |
run: | | |
pip install .[doc] | |
- name: Full Documentation Build | |
run: | | |
make -C doc phtml | |
- name: Upload documentation HTML artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: documentation-html | |
path: doc/_build/html | |
retention-days: 7 | |
docs_upload: | |
needs: docs_build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy development documentation | |
uses: ansys/actions/doc-deploy-dev@v4 | |
with: | |
cname: ${{ env.DOCUMENTATION_CNAME }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
doc-index-dev: | |
name: "Deploy dev docs index" | |
runs-on: ubuntu-latest | |
needs: docs_upload | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v3 | |
- name: Display structure of downloaded files | |
run: ls -R | |
- name: "Deploy the dev documentation index for PyAEDT API" | |
uses: ansys/actions/doc-deploy-index@v4 | |
with: | |
cname: ${{ env.DOCUMENTATION_CNAME }}/version/dev | |
index-name: pyaedt-vdev | |
host-url: ${{ vars.MEILISEARCH_HOST_URL }} | |
api-key: ${{ env.MEILISEARCH_API_KEY }} | |
# docstring_testing: | |
# runs-on: Windows | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - name: Setup Python | |
# uses: actions/setup-python@v2 | |
# with: | |
# python-version: 3.8 | |
# - name: 'Create virtual env' | |
# run: | | |
# python -m venv testenv | |
# testenv\Scripts\Activate.ps1 | |
# python -m pip install pip -U | |
# python -m pip install wheel setuptools -U | |
# python -c "import sys; print(sys.executable)" | |
# - name: 'Install pyaedt' | |
# run: | | |
# testenv\Scripts\Activate.ps1 | |
# pip install . --use-feature=in-tree-build | |
# cd _unittest | |
# python -c "import pyaedt; print('Imported pyaedt')" | |
# - name: Install testing requirements | |
# run: | | |
# testenv\Scripts\Activate.ps1 | |
# pip install -r requirements/requirements_test.txt | |
# pip install pytest-azurepipelines | |
# - name: Docstring testing | |
# run: | | |
# testenv\Scripts\Activate.ps1 | |
# pytest -v pyaedt/desktop.py pyaedt/icepak.py | |
# pytest -v pyaedt/desktop.py pyaedt/hfss.py |