From e62ef879f30eb570dbc26c2881ff26a963d7b37c Mon Sep 17 00:00:00 2001 From: Mirko Milovanovic Date: Sun, 9 Feb 2025 22:40:48 +0100 Subject: [PATCH] Refactor GitHub Actions workflow to install LaTeX dependencies and build document directly, updating artifact upload step --- .github/workflows/main.yml | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7332a59..d9eddb6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,19 +9,26 @@ on: jobs: build_latex: runs-on: ubuntu-latest + container: steps: + - name: Install Node.js + run: | + apt-get update && apt install -y curl + curl -fsSL https://deb.nodesource.com/setup_20.x | sudo bash - + apt-get install -y nodejs + - name: Set up Git repository uses: actions/checkout@v4.2.2 - - name: Compile LaTeX document - uses: xu-cheng/latex-action@3.2.0 - with: - root_file: Tesi.tex - docker_image: ghcr.io/xu-cheng/texlive-full:20250101 + - name: Install LaTeX + run: | + apt-get install miktex + miktexsetup --shared=yes finish - - name: Upload PDF file - if: github.ref == 'refs/heads/main' - uses: actions/upload-artifact@v4.6.0 + - name: Build LaTeX document + run: pdflatex -interaction=nonstopmode -halt-on-error Tesi.tex + + - name: Upload PDF artifact + uses: actions/upload-artifact@v4 with: - name: PDF - path: Tesi.pdf \ No newline at end of file + path: Test.pdf