Compare commits

...

7 Commits

5 changed files with 3622 additions and 46 deletions

View File

@@ -7,7 +7,7 @@ on:
branches: [ main ] branches: [ main ]
env: env:
TEX_NAME: Tesi.tex TEX_NAME: Tesi
PDF_NAME: Tesi.pdf PDF_NAME: Tesi.pdf
jobs: jobs:
@@ -20,21 +20,42 @@ jobs:
- name: Install MiKTeX - name: Install MiKTeX
run: | run: |
curl -fsSL https://miktex.org/download/key | tee /usr/share/keyrings/miktex-keyring.asc > /dev/null 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 jammy universe" | sudo tee /etc/apt/sources.list.d/miktex.list echo "deb [signed-by=/usr/share/keyrings/miktex-keyring.asc] https://miktex.org/download/ubuntu noble universe" | sudo tee /etc/apt/sources.list.d/miktex.list
apt-get update apt-get update
apt-get dist-upgrade -y
apt-get install miktex -y apt-get install miktex -y
miktexsetup --shared=yes finish miktexsetup --shared=yes finish
- name: Update MiKTeX package database
run: miktex packages update-package-database && miktex packages update
- name: Enable automatic package installation - name: Enable automatic package installation
run: initexmf --set-config-value=[MPM]AutoInstall=yes run: initexmf --set-config-value=[MPM]AutoInstall=yes
- name: Build LaTeX document - name: Build LaTeX document (first run)
run: |
pdflatex -interaction=nonstopmode -halt-on-error ${{ env.TEX_NAME }} || (cat /root/.miktex/texmfs/data/miktex/log/pdflatex.log && exit 1)
- name: Run Biber to process bibliography
run: biber ${{ env.TEX_NAME }}
- name: Build LaTeX document (second run)
run: |
pdflatex -interaction=nonstopmode -halt-on-error ${{ env.TEX_NAME }} || (cat /root/.miktex/texmfs/data/miktex/log/pdflatex.log && exit 1)
- name: Build LaTeX document (third run)
run: | run: |
pdflatex -interaction=nonstopmode -halt-on-error ${{ env.TEX_NAME }} || (cat /root/.miktex/texmfs/data/miktex/log/pdflatex.log && exit 1) pdflatex -interaction=nonstopmode -halt-on-error ${{ env.TEX_NAME }} || (cat /root/.miktex/texmfs/data/miktex/log/pdflatex.log && exit 1)
- name: Check for PDF artifact - name: Check for PDF artifact
run: file ${{ env.PDF_NAME }} || grep -q ' PDF ' run: file ${{ env.PDF_NAME }} || grep -q ' PDF '
- name: Delete latest release and tag
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
curl -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" -X DELETE https://gitea.kobim.cloud/api/v1/repos/${{ github.repository }}/releases/tags/latest
curl -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" -X DELETE https://gitea.kobim.cloud/api/v1/repos/${{ github.repository }}/tags/latest
- name: Release PDF artifact - name: Release PDF artifact
if: github.event_name == 'push' && github.ref == 'refs/heads/main' if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: softprops/action-gh-release@v2 uses: softprops/action-gh-release@v2
@@ -42,4 +63,5 @@ jobs:
files: ${{ env.PDF_NAME }} files: ${{ env.PDF_NAME }}
tag_name: latest tag_name: latest
body: | body: |
PDF document built from latest LaTeX source. PDF document built from latest LaTeX source.
token: ${{ secrets.RELEASE_TOKEN }}

8
.gitignore vendored
View File

@@ -295,4 +295,10 @@ env/
__pycache__/ __pycache__/
test/ test/
venv/ venv/
.venv/ .venv/
# Node.js
**/node_modules/
npm-debug.log
yarn-error.log
yarn-debug.log*

View File

@@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2022 Mirko Milovanovic Copyright (c) 2025 Mirko Milovanovic
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

File diff suppressed because one or more lines are too long