|
13 | 13 | PACKAGE_NAME: 'ansys-geometry-core' |
14 | 14 | # TODO : PIP_EXTRA_INDEX_URL should be deleted once the private dependencies are removed |
15 | 15 | PIP_EXTRA_INDEX_URL: 'https://${{ secrets.PYANSYS_PYPI_PRIVATE_PAT }}@pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi/simple/' |
| 16 | + PACKAGE_NAMESPACE: 'ansys.geometry.core' |
| 17 | + DOCUMENTATION_CNAME: 'geometry.docs.pyansys.com' |
16 | 18 | ANSRV_GEO_IMAGE: ghcr.io/pyansys/pygeometry:latest |
17 | 19 | ANSRV_GEO_PORT: 700 |
18 | 20 | GEO_CONT_NAME: ans_geo |
@@ -212,14 +214,14 @@ jobs: |
212 | 214 | - name: Upload integration test logs |
213 | 215 | uses: actions/upload-artifact@v3 |
214 | 216 | with: |
215 | | - name: Integration-Test-Logs |
| 217 | + name: integration-test-logs |
216 | 218 | path: tests/integration/logs |
217 | 219 | retention-days: 7 |
218 | 220 |
|
219 | 221 | - name: Upload Coverage Results |
220 | 222 | uses: actions/upload-artifact@v3 |
221 | 223 | with: |
222 | | - name: HTML-Coverage |
| 224 | + name: coverage-html |
223 | 225 | path: .cov/html |
224 | 226 | retention-days: 7 |
225 | 227 |
|
@@ -277,19 +279,37 @@ jobs: |
277 | 279 | docker run --detach --name $env:GEO_CONT_NAME -p $env:ANSRV_GEO_PORT_MAP $env:ANSRV_GEO_IMAGE |
278 | 280 | python -c "from ansys.geometry.core.connection.validate import validate; validate()" |
279 | 281 |
|
280 | | - - name: Build the documentation |
| 282 | + - name: Build the documentation (HTML) |
281 | 283 | run: | |
282 | 284 | .\.venv\Scripts\Activate.ps1 |
283 | 285 | cd doc |
284 | 286 | .\make.bat html |
285 | 287 |
|
| 288 | + - name: Build the documentation (PDF) |
| 289 | + # run: | |
| 290 | + # .\.venv\Scripts\Activate.ps1 |
| 291 | + # cd doc |
| 292 | + # .\make.bat pdf |
| 293 | + run: | |
| 294 | + cd doc/_build |
| 295 | + mkdir latex |
| 296 | + cd latex |
| 297 | + echo "" > dummy_docs.pdf |
| 298 | +
|
286 | 299 | - name: Upload HTML documentation |
287 | 300 | uses: actions/upload-artifact@v3 |
288 | 301 | with: |
289 | | - name: HTML-Documentation |
| 302 | + name: documentation-html |
290 | 303 | path: doc/_build/html |
291 | 304 | retention-days: 7 |
292 | 305 |
|
| 306 | + - name: Upload PDF documentation |
| 307 | + uses: actions/upload-artifact@v3 |
| 308 | + with: |
| 309 | + name: documentation-pdf |
| 310 | + path: doc/_build/latex/*.pdf |
| 311 | + retention-days: 7 |
| 312 | + |
293 | 313 | - name: Stop the geometry service |
294 | 314 | if: always() |
295 | 315 | run: | |
@@ -378,44 +398,27 @@ jobs: |
378 | 398 | ./**/*.tar.gz |
379 | 399 | ./**/*.zip |
380 | 400 |
|
381 | | - upload_docs_release: |
382 | | - name: Upload documentation |
383 | | - if: (github.event_name == 'push' && contains(github.ref, 'refs/tags')) || (github.ref == 'refs/heads/main') |
| 401 | + upload_docs_dev: |
| 402 | + name: Upload dev documentation |
| 403 | + if: github.ref == 'refs/heads/main' |
384 | 404 | runs-on: ubuntu-latest |
385 | 405 | needs: [package] |
386 | 406 | steps: |
387 | | - - uses: actions/checkout@v3 |
388 | | - |
389 | | - - uses: actions/download-artifact@v3 |
390 | | - with: |
391 | | - name: HTML-Documentation |
392 | | - path: HTML-Documentation |
393 | | - |
394 | | - - name: Get Bot Application Token |
395 | | - id: get_workflow_token |
396 | | - uses: peter-murray/workflow-application-token-action@v2 |
| 407 | + - name: Deploy the latest documentation |
| 408 | + uses: pyansys/actions/doc-deploy-dev@v1 |
397 | 409 | with: |
398 | | - application_id: ${{ secrets.BOT_APPLICATION_ID }} |
399 | | - application_private_key: ${{ secrets.BOT_APPLICATION_PRIVATE_KEY }} |
| 410 | + cname: ${{ env.DOCUMENTATION_CNAME }} |
| 411 | + token: ${{ secrets.GITHUB_TOKEN }} |
400 | 412 |
|
401 | | - - name: Deploy documentation to pygeometry-dev-docs repository |
402 | | - if: github.ref == 'refs/heads/main' |
403 | | - |
404 | | - with: |
405 | | - repository-name: pyansys/pygeometry-dev-docs |
406 | | - token: ${{ steps.get_workflow_token.outputs.token }} |
407 | | - branch: gh-pages |
408 | | - folder: HTML-Documentation |
409 | | - clean: true |
410 | | - single-commit: true |
411 | | - |
412 | | - - name: Deploy documentation to pygeometry-docs repository |
413 | | - if: github.event_name == 'push' && contains(github.ref, 'refs/tags') |
414 | | - |
| 413 | + upload_docs_release: |
| 414 | + name: Upload release documentation |
| 415 | + if: github.event_name == 'push' && contains(github.ref, 'refs/tags') |
| 416 | + runs-on: ubuntu-latest |
| 417 | + needs: [release] |
| 418 | + steps: |
| 419 | + - name: Deploy the stable documentation |
| 420 | + uses: pyansys/actions/doc-deploy-stable@v1 |
415 | 421 | with: |
416 | | - repository-name: pyansys/pygeometry-docs |
417 | | - token: ${{ steps.get_workflow_token.outputs.token }} |
418 | | - branch: gh-pages |
419 | | - folder: HTML-Documentation |
420 | | - clean: true |
421 | | - single-commit: true |
| 422 | + cname: ${{ env.DOCUMENTATION_CNAME }} |
| 423 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 424 | + python-version: ${{ env.MAIN_PYTHON_VERSION }} |
0 commit comments