Some checks failed
Build LaTeX Document / build_latex (pull_request) Has been cancelled
41 lines
1.2 KiB
YAML
41 lines
1.2 KiB
YAML
name: Build LaTeX Document
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
build_latex:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Install Node.js
|
|
run: |
|
|
apt-get update && apt-get upgrade -y && apt-get install -y curl
|
|
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
|
|
apt-get install -y nodejs
|
|
|
|
- name: Set up Git repository
|
|
uses: actions/checkout@v4.2.2
|
|
|
|
- name: Install LaTeX
|
|
run: |
|
|
curl -fsSL https://miktex.org/download/key | tee /usr/share/keyrings/miktex-keyring.asc > /dev/null
|
|
echo "deb [signed-by=/usr/share/keyrings/miktex-keyring.asc] https://miktex.org/download/ubuntu noble universe" | tee /etc/apt/sources.list.d/miktex.list
|
|
apt-get update
|
|
apt-get install miktex -y
|
|
miktexsetup --shared=yes finish
|
|
|
|
- name: Update MiKTeX
|
|
run: miktexsetup --update
|
|
|
|
- name: Build LaTeX document
|
|
run: |
|
|
pdflatex -interaction=nonstopmode -halt-on-error Tesi.tex || (cat /root/.miktex/texmfs/data/miktex/log/pdflatex.log && exit 1)
|
|
|
|
- name: Upload PDF artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
path: Test.pdf
|