Skip to content

Commit 9acf705

Browse files
ci: simplify doc build using ansys/actions (#1262)
Co-authored-by: pyansys-ci-bot <pyansys.github.bot@ansys.com>
1 parent a153ec6 commit 9acf705

File tree

2 files changed

+7
-54
lines changed

2 files changed

+7
-54
lines changed

.github/workflows/ci_cd.yml

Lines changed: 6 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -267,28 +267,9 @@ jobs:
267267
group: pyansys-self-hosted
268268
labels: [Windows, pygeometry]
269269
steps:
270-
- uses: actions/checkout@v4
271-
272-
- name: Set up Python
273-
uses: actions/setup-python@v5
274-
with:
275-
python-version: ${{ env.MAIN_PYTHON_VERSION }}
276-
277270
- name: Set up headless display
278271
uses: pyvista/setup-headless-display-action@v2
279272

280-
- name: Create Python venv
281-
run: |
282-
python -m venv .venv
283-
.\.venv\Scripts\Activate.ps1
284-
285-
- name: Install packages for documentation build
286-
run: |
287-
.\.venv\Scripts\Activate.ps1
288-
python -m pip install --upgrade pip
289-
pip install --upgrade build wheel
290-
pip install .[doc]
291-
292273
- name: Login to GitHub Container Registry
293274
uses: docker/login-action@v3
294275
with:
@@ -304,43 +285,14 @@ jobs:
304285
run:
305286
echo "ANSRV_GEO_LICENSE_SERVER=${{ secrets.INTERNAL_LICENSE_SERVER }}" | Out-File -FilePath $env:GITHUB_ENV -Append
306287

307-
- name: Start Geometry service and verify start
308-
run: |
309-
.\.venv\Scripts\Activate.ps1
310-
docker run --detach --name ${{ env.GEO_CONT_NAME }} -e LICENSE_SERVER=${{ env.ANSRV_GEO_LICENSE_SERVER }} -p ${{ env.ANSRV_GEO_PORT }}:50051 ${{ env.ANSRV_GEO_IMAGE_WINDOWS_TAG }}
311-
python -c "from ansys.geometry.core.connection.validate import validate; validate()"
312-
313-
- name: Build the documentation (HTML)
314-
run: |
315-
.\.venv\Scripts\Activate.ps1
316-
cd doc
317-
.\make.bat html
318-
319-
- name: Build the documentation (PDF)
320-
run: |
321-
.\.venv\Scripts\Activate.ps1
322-
cd doc
323-
.\make.bat pdf
324-
325-
- name: Add assets to HTML docs
326-
run: |
327-
zip -r documentation-html.zip .\doc\_build\html
328-
mv documentation-html.zip .\doc\_build\html\_static\assets\download\
329-
cp doc/_build/latex/ansys-geometry-core.pdf .\doc\_build\html\_static\assets\download\
288+
- name: Start Geometry service
289+
run: docker run --detach --name ${{ env.GEO_CONT_NAME }} -e LICENSE_SERVER=${{ env.ANSRV_GEO_LICENSE_SERVER }} -p ${{ env.ANSRV_GEO_PORT }}:50051 ${{ env.ANSRV_GEO_IMAGE_WINDOWS_TAG }}
330290

331-
- name: Upload HTML documentation
332-
uses: actions/upload-artifact@v4
291+
- name: Run Ansys documentation building action
292+
uses: ansys/actions/doc-build@v6
333293
with:
334-
name: documentation-html
335-
path: doc/_build/html
336-
retention-days: 7
337-
338-
- name: Upload PDF documentation
339-
uses: actions/upload-artifact@v4
340-
with:
341-
name: documentation-pdf
342-
path: doc/_build/latex/ansys-geometry-core*.pdf
343-
retention-days: 7
294+
python-version: ${{ env.MAIN_PYTHON_VERSION }}
295+
add-pdf-html-docs-as-assets: true
344296

345297
- name: Stop the Geometry service
346298
if: always()

doc/changelog.d/1262.changed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ci: simplify doc build using ansys/actions

0 commit comments

Comments
 (0)