Skip to content

fix: update .gitignore to comment out main.pdf and add main.pdf to th… #215

fix: update .gitignore to comment out main.pdf and add main.pdf to th…

fix: update .gitignore to comment out main.pdf and add main.pdf to th… #215

name: 'Check LaTeX document building'
on:
pull_request:
branches:
- main
- develop
- relazione
push:
branches:
- main
- relazione
workflow_dispatch:
jobs:
build-latex-document:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v4
- name: Compile main LaTeX document
uses: xu-cheng/latex-action@v3
with:
working_directory: latex
root_file: main.tex
- name: Check if PDF was created
run: |
ls -la
ls -la latex
if [ -f "latex/main.pdf" ]; then
echo "PDF built successfully."
else
echo "PDF build failed." >&2
exit 1
fi
# - name: Commit and push pdf
# run: |
# cp latex/main.pdf main.pdf
# git config --global user.name "GitHub Actions Bot"
# git config --global user.email "[email protected]"
# git add main.pdf
# git commit -m "feat: add main.pdf from LaTeX build"
# git push
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}