refined forgejo workflows
Some checks failed
build-latex / build (push) Failing after 4s

This commit is contained in:
Jonas_Jones 2025-06-10 18:44:25 +02:00
parent fc14b7184e
commit 30886d8e06

View file

@ -1,31 +1,40 @@
name: Build LaTeX Document name: build-latex
on: [ push, pull_request ]
on:
push:
branches:
- main
pull_request:
jobs: jobs:
build-latex: build:
runs-on: ubuntu-latest runs-on: docker
steps: steps:
- name: Checkout repository - name: checkout repository
uses: actions/checkout@v3 uses: https://code.forgejo.org/actions/checkout@v4
- name: Install LaTeX - name: restore cached LaTeX packages
uses: https://code.forgejo.org/actions/cache/restore@v4
with:
path: /var/lib/apt/lists
key: ${{ runner.os }}-texlive
- name: install LaTeX
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended sudo apt-get install -y texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
- name: Compile LaTeX document - name: compile LaTeX document
run: | run: |
pdflatex -interaction=nonstopmode main.tex pdflatex -interaction=nonstopmode main.tex
pdflatex -interaction=nonstopmode main.tex # run twice for refs pdflatex -interaction=nonstopmode main.tex
- name: Upload PDF artifact - name: capture PDF artifact
uses: actions/upload-artifact@v3 uses: https://code.forgejo.org/forgejo/upload-artifact@v4
with: with:
name: main-pdf name: main-pdf
path: main.pdf path: main.pdf
if-no-files-found: error
- name: cache LaTeX packages
if: ${{ github.ref_name == github.event.repository.default_branch }}
uses: https://code.forgejo.org/actions/cache/save@v4
with:
path: /var/lib/apt/lists
key: ${{ runner.os }}-texlive