Make PDF 1 selected #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build PDF 1 selected (with log output) | |
# no apt update included | |
on: | |
workflow_dispatch: | |
inputs: | |
pdf_target: | |
description: "Which PDF? (hpmor, hpmor-1, ..., hpmor-6)" | |
required: true | |
default: "hpmor" | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: print selection | |
run: | | |
echo "selected PDF: ${{ github.event.inputs.pdf_target }}" | |
- name: print start date | |
run: date +%Y-%m-%d_%H:%M | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
fetch-depth: 1 # 0 if you want to push to repo | |
- name: caching LaTeX files | |
uses: actions/cache@v4 | |
with: | |
path: | | |
chapters/*.aux | |
hpmor*.aux | |
hpmor*.fls | |
hpmor*.pdf | |
hpmor*.out | |
hpmor*.toc | |
hpmor*.xdv | |
key: tex-cache | |
- name: ls chapters | |
run: ls -l chapters/ | |
- name: Python set up | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
# cache: "pip" | |
- name: Test ls before | |
run: | | |
pwd | |
ls -l | |
- name: Check chapters for known issues | |
run: python3 -O scripts/check_chapters.py | |
- name: Install requirements | |
run: | | |
# sudo apt update > /dev/null | |
sh scripts/install_requirements_pdf.sh > /dev/null | |
- 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 }}" | |
- name: Publish PDF to release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: WorkInProgress | |
prerelease: true | |
files: | | |
./hpmor*.pdf | |
- name: Test ls after | |
run: | | |
ls -l | |
- name: Print end date | |
run: date +%Y-%m-%d_%H:%M |