forked from rrthomas/hpmor
-
Notifications
You must be signed in to change notification settings - Fork 6
97 lines (81 loc) · 2.27 KB
/
make-pdf-1-select.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
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
chapters/*.aux
hpmor*.aux
hpmor*.fdb_latexmk
hpmor*.fls
hpmor*.out
hpmor*.pdf
hpmor*.toc
hpmor*.xdv
key: latex
- name: ls chapters
run: ls -l chapters/
- name: python set up
uses: actions/setup-python@v5
with:
python-version: "3.10"
# cache: "pip"
- name: ls before
run: |
pwd
ls -l
- name: check chapters for known issues
run: python3 -O scripts/check_chapters.py
- name: install PDF 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 }}" > /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
- name: print end date
run: date +%Y-%m-%d_%H:%M