Skip to content

Commit 7dfb643

Browse files
authored
Merge branch 'main' into example_maxwell_transient_fields
2 parents 0eb4486 + 08b9456 commit 7dfb643

File tree

2 files changed

+12
-366
lines changed

2 files changed

+12
-366
lines changed

.github/workflows/ci_cd.yml

+12-11
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ jobs:
4848
uses: actions/setup-python@v4
4949
with:
5050
python-version: ${{ env.MAIN_PYTHON_VERSION }}
51-
use-cache: false
5251

5352
- name: Create virtual environment
5453
run: |
@@ -65,19 +64,21 @@ jobs:
6564
6665
# Use environment variable to keep the doctree and avoid redundant build for PDF pages
6766
- name: Create HTML documentation
68-
id: create_html
6967
env:
7068
SPHINXBUILD_KEEP_DOCTREEDIR: "1"
7169
run: |
7270
.venv\Scripts\Activate.ps1
73-
74-
# NOTE: The error redirection is leveraged to make sphinx exit with non null value on CellExecutionError.
75-
. .\doc\make.bat html -j auto --color 2> sphinx-build_error.log
76-
77-
$error_log = Get-Content sphinx-build_error.log
78-
if ($error_log -match 'CellExecutionError') {
79-
Write-Error "Sphinx build failed with cell execution Error."
80-
exit 1
71+
. .\doc\make.bat html --color
72+
73+
# NOTE: Ugly HTML checking but redirecting errors with our docs either leads
74+
# to errors in powershell or workflows getting stuck in Github CICD.
75+
- name: Check HTML doc creation
76+
run : |
77+
if (Test-Path "doc\_build\html\index.html" ) {
78+
Write-Output "File index.html found, HTML build successful."
79+
} else {
80+
Write-Error "Sphinx build failed, check if there is no cell execution error."
81+
exit 1
8182
}
8283
8384
- name: Upload HTML documentation artifact
@@ -110,7 +111,7 @@ jobs:
110111
needs: [doc-build]
111112
steps:
112113
- name: Deploy the documentation
113-
uses: ansys/actions/doc-deploy-stable@v4
114+
uses: ansys/actions/doc-deploy-dev@v5
114115
with:
115116
cname: ${{ env.DOCUMENTATION_CNAME }}
116117
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)