mirror of
https://github.com/pyTooling/Actions.git
synced 2026-02-12 02:56:56 +08:00
Workaround 2 - % sign in a filename.
This commit is contained in:
3
.github/workflows/LaTeXDocumentation.yml
vendored
3
.github/workflows/LaTeXDocumentation.yml
vendored
@@ -59,7 +59,6 @@ jobs:
|
||||
run: |
|
||||
tree -pash .
|
||||
|
||||
|
||||
- name: Build LaTeX document using 'pytooling/miktex:sphinx'
|
||||
uses: addnab/docker-run-action@v3
|
||||
with:
|
||||
@@ -70,7 +69,7 @@ jobs:
|
||||
pwd
|
||||
ls -lAh
|
||||
|
||||
latexmk ${{ inputs.document }}.tex
|
||||
latexmk -xelatex ${{ inputs.document }}.tex
|
||||
|
||||
- name: 📤 Upload 'PDF Documentation' artifact
|
||||
uses: pyTooling/upload-artifact@v4
|
||||
|
||||
33
.github/workflows/SphinxDocumentation.yml
vendored
33
.github/workflows/SphinxDocumentation.yml
vendored
@@ -180,6 +180,39 @@ jobs:
|
||||
sphinx-build -v -n -b latex -d _build/doctrees -j $(nproc) -w _build/latex.log . _build/latex
|
||||
# --builder html --doctree-dir _build/doctrees --verbose --fresh-env --write-all --nitpicky --warning-file _build/html.log . _build/html
|
||||
|
||||
- name: Workaround II - https://github.com/sphinx-doc/sphinx/issues/13189
|
||||
if: inputs.latex_artifact != ''
|
||||
run: |
|
||||
printf "Changing directory to 'doc/_build/latex' ...\n"
|
||||
cd doc/_build/latex
|
||||
|
||||
printf "Searching for downloaded images, that need normalization ...\n"
|
||||
for imageExt in png svg jpg jpeg; do
|
||||
printf " Processing '%s' ...\n" "${imageExt}"
|
||||
while IFS=$'\n' read -r imageFile; do
|
||||
newFile="${imageFile//%/_}";
|
||||
|
||||
printf " %s\n" "$imageFile";
|
||||
if [[ "${imageFile}" != "${newFile}" ]]; then
|
||||
printf " Rename file to '%s' " "${newFile}"
|
||||
mv "${imageFile}" "${newFile}"
|
||||
if [[ $? -eq 0 ]]; then
|
||||
printf "[OK]\n"
|
||||
else
|
||||
printf "[FAILED]\n"
|
||||
fi
|
||||
|
||||
printf " Patching LaTeX file for '%s' " "${newFile}"
|
||||
sed -i "s:\{\{${imageFile%.*}\}\.${imageFile##*.}\}:{{${newFile%.*}}.${newFile##*.}}:g" *.tex
|
||||
if [[ $? -eq 0 ]]; then
|
||||
printf "[OK]\n"
|
||||
else
|
||||
printf "[FAILED]\n"
|
||||
fi
|
||||
fi
|
||||
done <<<$(find . -type f -iname "*.$imageExt" | sed 's:./::')
|
||||
done
|
||||
|
||||
- name: 📤 Upload 'LaTeX Documentation' artifact
|
||||
if: inputs.latex_artifact != ''
|
||||
continue-on-error: true
|
||||
|
||||
Reference in New Issue
Block a user