This commit is contained in:
parent
48b72595a8
commit
2fa2a91e66
2 changed files with 21 additions and 1 deletions
48
.forgejo/workflows/build-latex.yml
Normal file
48
.forgejo/workflows/build-latex.yml
Normal file
|
@ -0,0 +1,48 @@
|
|||
name: build-latex
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: docker
|
||||
|
||||
steps:
|
||||
- name: checkout repository
|
||||
uses: https://code.forgejo.org/actions/checkout@v4
|
||||
|
||||
- name: restore cached apt lists
|
||||
uses: https://code.forgejo.org/actions/cache/restore@v4
|
||||
with:
|
||||
path: /var/lib/apt/lists
|
||||
key: ${{ runner.os }}-texlive-full
|
||||
|
||||
- name: install full TeX Live
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y texlive-full
|
||||
|
||||
- name: compile LaTeX document
|
||||
run: |
|
||||
pdflatex -interaction=nonstopmode main.tex || true
|
||||
pdflatex -interaction=nonstopmode main.tex || true
|
||||
if [ ! -f main.pdf ]; then
|
||||
echo "PDF was not generated."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: capture PDF artifact
|
||||
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
||||
with:
|
||||
name: main-pdf
|
||||
path: main.pdf
|
||||
if-no-files-found: error
|
||||
|
||||
- name: cache apt lists
|
||||
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-full
|
Loading…
Add table
Add a link
Reference in a new issue