Skip to content

Merge overleaf-2025-02-19-0826 into main #13

Merge overleaf-2025-02-19-0826 into main

Merge overleaf-2025-02-19-0826 into main #13

name: Build and Deploy LaTeX Document
permissions: write-all
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
# Restore the TeX Live installation from cache
- name: Restore TeX Live Cache
uses: actions/cache@v3
with:
path: |
/usr/local/texlive
key: texlive-${{ runner.os }}-${{ hashFiles('**/*.tex') }}
- name: Install TeX Live
run: |
sudo apt update
sudo apt install texlive-full
- name: Build Latex PDF
run: |
mkdir ./public
cp *.tex public/
cp -r images/ public/
cd public/
pdflatex ElaboracionMemoriaTFG.tex
pdflatex ElaboracionMemoriaTFG.tex
make4ht ElaboracionMemoriaTFG.tex
mv ElaboracionMemoriaTFG.html index.html
# Save the TeX Live installation to cache for future use
- name: Save TeX Live Cache
uses: actions/cache@v3
with:
path: |
/usr/local/texlive
key: texlive-${{ runner.os }}-${{ hashFiles('**/*.tex') }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: PDF
path: public/ElaboracionMemoriaTFG.pdf
- name: Publish PDF
uses: softprops/action-gh-release@v1
with:
tag_name: ÚltimaCompilación
files: public/ElaboracionMemoriaTFG.pdf
- name: Publish HTML to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public