Skip to content

Commit 8696408

Browse files
committed
fix: update PDF generation logic to correctly move main document PDF
1 parent 1d141c9 commit 8696408

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/_build.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,13 @@ jobs:
263263
TEX=$(ls *.tex | head -n 1) && \
264264
xelatex -interaction=nonstopmode -halt-on-error "$TEX" && \
265265
xelatex -interaction=nonstopmode -halt-on-error "$TEX" )
266-
mv build/doc/*.pdf "datalab/data/doc/DataLab_${LNG}.pdf"
266+
# Move the main document PDF (named after the .tex file). The
267+
# build dir may also contain converted SVG→PDF assets
268+
# (sponsors, icons) produced by sphinxcontrib.cairosvgconverter,
269+
# so we cannot rely on a glob here.
270+
MAIN_PDF=$(ls build/doc/*.tex | head -n 1)
271+
MAIN_PDF="${MAIN_PDF%.tex}.pdf"
272+
mv "$MAIN_PDF" "datalab/data/doc/DataLab_${LNG}.pdf"
267273
done
268274
ls -lh datalab/data/doc/
269275

0 commit comments

Comments
 (0)