Skip to content

Make PDF 1 selected #22

Make PDF 1 selected

Make PDF 1 selected #22

name: Make PDF 1 selected
# no apt update included
on:
workflow_dispatch:
inputs:
pdf_target:
description: "Which PDF? (hpmor, hpmor-1, ..., hpmor-6)"
required: true
default: "hpmor"
jobs:
make:
runs-on: ubuntu-24.04
steps:
- name: Print selection
run: |
echo "selected PDF: ${{ github.event.inputs.pdf_target }}"
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 1 # 0 if you want to push to repo
- name: Cache LaTeX files
uses: actions/cache@v4
with:
path: |
chapters/*.aux
hpmor*.aux
hpmor*.fdb_latexmk
hpmor*.fls
hpmor*.out
hpmor*.pdf
hpmor*.toc
hpmor*.xdv
key: latex-build-files
- name: ls before
run: |
pwd
ls -l chapters/
ls -l
# - name: Install PDF requirements
# run: |
# # not: to save time
# # sudo apt-get update > /dev/null
# sh scripts/install_requirements_pdf.sh > /dev/null
- name: Install PDF requirements using cache
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: texlive-xetex texlive-lang-greek texlive-lang-german latexmk
version: 1.0
execute_install_scripts: true
- name: Manual install latexmk to fix caching issue
# since cache does not properly work / "convert" not found
run: |
sudo apt-get install latexmk
- name: Print versions
run: |
cat /etc/os-release
xelatex -v
latexmk -v
# pandoc -v
python3 --version
- name: Make PDF
run: |
latexmk "${{ github.event.inputs.pdf_target }}" > /dev/null
- name: Publish PDF to release
uses: softprops/action-gh-release@v2
with:
tag_name: WorkInProgress
prerelease: true
files: |
./hpmor*.pdf
- name: Upload log as artifact
uses: actions/upload-artifact@v4
with:
name: "${{ github.event.inputs.pdf_target }}.log"
path: "${{ github.event.inputs.pdf_target }}.log"
- name: ls after
run: |
ls -l