-
Notifications
You must be signed in to change notification settings - Fork 1
32 lines (27 loc) · 953 Bytes
/
build.yaml
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
name: Generate PDF
on:
push:
branches:
- 'main'
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build PDFs
run: |
base_path=$(realpath uebungsanleitungen_liste)
for dir in "$base_path"/*/; do
if [ -d "$dir" ]; then
subfolder_name=$(basename "$dir")
echo "Processing directory: $subfolder_name"
docker run --rm -v "$(pwd):/data" -w /data/uebungsanleitungen_liste/$subfolder_name --entrypoint xelatex rstropek/pandoc-coderdojo main.tex
mv uebungsanleitungen_liste/$subfolder_name/main.pdf uebungsanleitungen_liste/$subfolder_name/$subfolder_name.pdf
fi
done
- name: Publish PDF
uses: actions/upload-artifact@v4
with:
name: Uebungsanleitungen
path: uebungsanleitungen_liste/**/*.pdf