diff --git a/.github/workflows/latex.yml b/.github/workflows/latex.yml index 27e1f0a..fa5b77d 100644 --- a/.github/workflows/latex.yml +++ b/.github/workflows/latex.yml @@ -52,13 +52,24 @@ jobs: - name: Compute LaTeX roots id: roots run: | - roots="main.tex" - while IFS= read -r file; do - base=$(basename "$file") - roots="$roots,$base" - done < <(ls paper/src/main-mirror-*.tex 2>/dev/null || true) - echo "root_files=$roots" >> "$GITHUB_OUTPUT" - echo "Compiling roots: $roots" + { + echo "root_files<> "$GITHUB_OUTPUT" + + echo "Compiling roots:" + echo "main.tex" + for file in paper/src/main-mirror-*.tex; do + if [ -f "$file" ]; then + basename "$file" + fi + done - name: Compile LaTeX documents uses: xu-cheng/latex-action@v3