Skip to content

Commit a8b7c53

Browse files
committed
fix: python-version in cicd
1 parent 5a90cc7 commit a8b7c53

File tree

4 files changed

+19
-7
lines changed

4 files changed

+19
-7
lines changed

.github/workflows/autodoc_cicd.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ env:
1616
RESET_PIP_CACHE_2: 1
1717
RESET_AUTOSUMMARY_CACHE_2: 1
1818
RESET_DOC_BUILD_CACHE_2: 1
19+
MAIN_PYTHON_VERSION: '3.12'
1920

2021

2122
jobs:
@@ -29,7 +30,7 @@ jobs:
2930
- name: "Setup Python"
3031
uses: actions/setup-python@v5
3132
with:
32-
python-version: ${{ inputs.MAIN_PYTHON_VERSION }}
33+
python-version: ${{ env.MAIN_PYTHON_VERSION }}
3334

3435
- name: "Cache pip"
3536
uses: actions/cache@v4
@@ -80,7 +81,7 @@ jobs:
8081
- name: PyAnsys code style checks
8182
uses: ansys/actions/code-style@v8
8283
with:
83-
python-version: ${{ inputs.MAIN_PYTHON_VERSION }}
84+
python-version: ${{ env.MAIN_PYTHON_VERSION }}
8485
use-python-cache: false
8586

8687

@@ -98,9 +99,9 @@ jobs:
9899
uses: actions/cache@v4
99100
with:
100101
path: ~/.cache/pip
101-
key: Python-pyconverter-generatedcommands-v${{ env.RESET_PIP_CACHE_2 }}-${{ inputs.MAIN_PYTHON_VERSION }}-${{ hashFiles('pyproject.toml') }}
102+
key: Python-pyconverter-generatedcommands-v${{ env.RESET_PIP_CACHE_2 }}-${{ env.MAIN_PYTHON_VERSION }}-${{ hashFiles('pyproject.toml') }}
102103
restore-keys: |
103-
Python-pyconverter-generatedcommands-v${{ env.RESET_PIP_CACHE_2 }}-${{ inputs.MAIN_PYTHON_VERSION }}
104+
Python-pyconverter-generatedcommands-v${{ env.RESET_PIP_CACHE_2 }}-${{ env.MAIN_PYTHON_VERSION }}
104105
105106
- name: "Install pyconverter-generatedcommands"
106107
run: |
@@ -130,7 +131,7 @@ jobs:
130131
- name: "Run Ansys documentation building action"
131132
uses: ansys/actions/doc-build@v8
132133
with:
133-
python-version: ${{ inputs.MAIN_PYTHON_VERSION }}
134+
python-version: ${{ env.MAIN_PYTHON_VERSION }}
134135
checkout: false
135136
sphinxopts: -j auto
136137
check-links: false

_package/doc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ clean:
2525
pdf:
2626
@$(SPHINXBUILD) -M latex "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
2727
cd $(BUILDDIR)/latex && latexmk -r latexmkrc -pdf *.tex -interaction=nonstopmode || true
28-
(test -f $(BUILDDIR)/latex/pyconverter-generatedcommands-Documentation-*.pdf && echo pdf exists) || exit 1
28+
(test -f $(BUILDDIR)/latex/pyconverter-generatedcommands-documentation-*.pdf && echo pdf exists) || exit 1

_package/doc/make.bat

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,16 @@ goto end
5757
:help
5858
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
5959

60+
:pdf
61+
%SPHINXBUILD% -M latex %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
62+
cd "%BUILDDIR%\latex"
63+
for %%f in (*.tex) do (
64+
pdflatex "%%f" --interaction=nonstopmode)
65+
if NOT EXIST pyconverter-generatedcommands-documentation.pdf (
66+
Echo "no pdf generated!"
67+
exit /b 1)
68+
Echo "pdf generated!"
69+
goto end
70+
6071
:end
6172
popd

_package/doc/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
latex_documents = [
103103
(
104104
master_doc,
105-
f"{project}-Documentation-{__version__}.tex",
105+
f"{project}-documentation-{__version__}.tex",
106106
f"{project} Documentation",
107107
author,
108108
"manual",

0 commit comments

Comments
 (0)