Compare commits
1 Commits
cec8893d4c
...
88b7d3efdd
Author | SHA1 | Date | |
---|---|---|---|
88b7d3efdd |
30
.github/workflows/main.yml
vendored
30
.github/workflows/main.yml
vendored
@@ -6,6 +6,9 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
PDF_NAME: Tesi.pdf
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_latex:
|
build_latex:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -13,15 +16,22 @@ jobs:
|
|||||||
- name: Set up Git repository
|
- name: Set up Git repository
|
||||||
uses: actions/checkout@v4.2.2
|
uses: actions/checkout@v4.2.2
|
||||||
|
|
||||||
- name: Compile LaTeX document
|
- name: Install LaTeX
|
||||||
uses: xu-cheng/latex-action@3.2.0
|
run: |
|
||||||
with:
|
curl -fsSL https://miktex.org/download/key | tee /usr/share/keyrings/miktex-keyring.asc > /dev/null
|
||||||
root_file: Tesi.tex
|
echo "deb [signed-by=/usr/share/keyrings/miktex-keyring.asc] https://miktex.org/download/ubuntu jammy universe" | sudo tee /etc/apt/sources.list.d/miktex.list
|
||||||
docker_image: ghcr.io/xu-cheng/texlive-full:20250101
|
apt-get update
|
||||||
|
apt-get install miktex -y
|
||||||
|
miktexsetup --shared=yes finish
|
||||||
|
|
||||||
- name: Upload PDF file
|
- name: Enable automatic package installation
|
||||||
if: github.ref == 'refs/heads/main'
|
run: initexmf --set-config-value=[MPM]AutoInstall=yes
|
||||||
uses: actions/upload-artifact@v4.6.0
|
|
||||||
|
- name: Build LaTeX document
|
||||||
|
run: |
|
||||||
|
pdflatex -interaction=nonstopmode -halt-on-error ${{ env.PDF_NAME }} || (cat /root/.miktex/texmfs/data/miktex/log/pdflatex.log && exit 1)
|
||||||
|
|
||||||
|
- name: Upload PDF artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: PDF
|
path: ${{ env.PDF_NAME }}
|
||||||
path: Tesi.pdf
|
|
||||||
|
Reference in New Issue
Block a user