-
Notifications
You must be signed in to change notification settings - Fork 128
126 lines (102 loc) · 3.61 KB
/
nightly-docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
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@v3
- 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
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"
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
runs-on: ubuntu-latest
needs: docs_upload
steps:
- uses: actions/checkout@v3
- 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-v${{ env.VERSION_MEILI }}
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-v${{ env.VERSION_MEILI }}
host-url: ${{ vars.MEILISEARCH_HOST_URL }}
api-key: ${{ env.MEILISEARCH_API_KEY }}
doc-artifact-name: documentation-html/EDBAPI # Add only EDB API to index
# docstring_testing:
# runs-on: Windows
# steps:
# - uses: actions/checkout@v3
# - 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