48
48
uses : actions/setup-python@v4
49
49
with :
50
50
python-version : ${{ env.MAIN_PYTHON_VERSION }}
51
- use-cache : false
52
51
53
52
- name : Create virtual environment
54
53
run : |
@@ -65,19 +64,21 @@ jobs:
65
64
66
65
# Use environment variable to keep the doctree and avoid redundant build for PDF pages
67
66
- name : Create HTML documentation
68
- id : create_html
69
67
env :
70
68
SPHINXBUILD_KEEP_DOCTREEDIR : " 1"
71
69
run : |
72
70
.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
81
82
}
82
83
83
84
- name : Upload HTML documentation artifact
@@ -110,7 +111,7 @@ jobs:
110
111
needs : [doc-build]
111
112
steps :
112
113
- name : Deploy the documentation
113
- uses : ansys/actions/doc-deploy-stable@v4
114
+ uses : ansys/actions/doc-deploy-dev@v5
114
115
with :
115
116
cname : ${{ env.DOCUMENTATION_CNAME }}
116
117
token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments