Chapter 12: fix a minor inconsistency #141
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
# This workflow builds PDFs and eBooks upon push of new commits. | |
# Generated assets are uploaded to release WorkInProgress. | |
name: Build HPMOR PDFs and eBooks | |
on: | |
workflow_dispatch: # manual triggering | |
push: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
fetch-depth: 1 # 0 if you want to push to repo | |
- name: Touch requirements.txt for pip caching | |
run: touch requirements.txt | |
- name: Caching 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: tex-cache | |
- name: Python set up | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
cache: "pip" | |
# - name: test ls before | |
# run: | | |
# pwd | |
# ls -al | |
- name: Check chapters for known issues | |
run: python3 scripts/check_chapters.py | |
- name: Check pre-commit tests | |
uses: pre-commit/[email protected] | |
- name: Install requirements | |
run: sh scripts/install_requirements.sh > /dev/null | |
- name: Print versions | |
run: | | |
cat /etc/os-release | |
xelatex -v | |
latexmk -v | |
pandoc -v | |
ebook-convert --version | |
python3 --version | |
- name: Download previous hpmor.html | |
run: | | |
wget --quiet https://github.com/${{ github.repository }}/releases/tag/WorkInProgress/hpmor.html -O hpmor-prev.html | |
- name: Make PDFs | |
run: sh scripts/make_pdfs.sh > /dev/null | |
- name: Make eBooks | |
run: sh scripts/make_ebooks.sh | |
- name: Compare to previous hpmor.html | |
run: | | |
diff -u hpmor-prev.html hpmor.html > hpmor-html-diff.log || : | |
rm hpmor-prev.html | |
- name: Test ls after | |
run: | | |
pwd | |
ls -al | |
- name: Upload eBooks as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ebooks | |
path: | | |
./hpmor.pdf | |
./hpmor.html | |
./hpmor-html-diff.log | |
./hpmor.epub | |
retention-days: 14 | |
- name: Upload files to release WorkInProgress | |
uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: WorkInProgress | |
prerelease: true | |
files: | | |
./hpmor*.pdf | |
./hpmor.epub | |
./hpmor.mobi | |
./hpmor.fb2 | |
./hpmor.html | |
./hpmor-html-diff.log |