This commit is contained in:
parent
fc14b7184e
commit
30886d8e06
1 changed files with 25 additions and 16 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue