Nightly Documentation Build #851
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: | |
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@v4 | |
with: | |
python-version: 3.8 | |
- 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@v3 | |
with: | |
name: documentation-html | |
path: doc/_build/html | |
retention-days: 7 | |
- name: Upload HTML documentation artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: documentation-html-edb | |
path: doc/_build/html/EDBAPI | |
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 }} | |
pymeilisearchopts: --stop_urls \"EDBAPI\" # Add EDB API as another index to show it in dropdown button | |
- name: "Deploy the dev documentation index for EDB API" | |
uses: ansys/actions/doc-deploy-index@v4 | |
with: | |
cname: ${{ env.DOCUMENTATION_CNAME }}/version/dev/EDBAPI/ | |
index-name: pyedb-vdev | |
host-url: ${{ vars.MEILISEARCH_HOST_URL }} | |
api-key: ${{ env.MEILISEARCH_API_KEY }} | |
doc-artifact-name: documentation-html-edb # Add only EDB API as page in this index. | |
pymeilisearchopts: --port 8001 # serve in another port as 8000 is deafult | |
# 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 |