Skip to content

Commit 7a627cd

Browse files
RobPasMuepre-commit-ci[bot]pyansys-ci-bot
authored
docs: using ansys actions (again) to build docs (#1270)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: pyansys-ci-bot <pyansys.github.bot@ansys.com>
1 parent f13448f commit 7a627cd

File tree

2 files changed

+6
-59
lines changed

2 files changed

+6
-59
lines changed

.github/workflows/ci_cd.yml

Lines changed: 5 additions & 59 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:
@@ -305,48 +286,13 @@ jobs:
305286
echo "ANSRV_GEO_LICENSE_SERVER=${{ secrets.INTERNAL_LICENSE_SERVER }}" | Out-File -FilePath $env:GITHUB_ENV -Append
306287

307288
- 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: Check links
320-
run: |
321-
.\.venv\Scripts\Activate.ps1
322-
cd doc
323-
.\make.bat linkcheck
324-
325-
- name: Build the documentation (PDF)
326-
run: |
327-
.\.venv\Scripts\Activate.ps1
328-
cd doc
329-
.\make.bat pdf
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: Add assets to HTML docs
332-
run: |
333-
zip -r documentation-html.zip .\doc\_build\html
334-
mv documentation-html.zip .\doc\_build\html\_static\assets\download\
335-
cp doc/_build/latex/ansys-geometry-core.pdf .\doc\_build\html\_static\assets\download\
336-
337-
- name: Upload HTML documentation
338-
uses: actions/upload-artifact@v4
291+
- name: Run Ansys documentation building action
292+
uses: ansys/actions/doc-build@v6
339293
with:
340-
name: documentation-html
341-
path: doc/_build/html
342-
retention-days: 7
343-
344-
- name: Upload PDF documentation
345-
uses: actions/upload-artifact@v4
346-
with:
347-
name: documentation-pdf
348-
path: doc/_build/latex/ansys-geometry-core*.pdf
349-
retention-days: 7
294+
python-version: ${{ env.MAIN_PYTHON_VERSION }}
295+
add-pdf-html-docs-as-assets: true
350296

351297
- name: Stop the Geometry service
352298
if: always()

doc/changelog.d/1270.changed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docs: using ansys actions (again) to build docs

0 commit comments

Comments
 (0)