-
Notifications
You must be signed in to change notification settings - Fork 3
91 lines (81 loc) · 2.83 KB
/
lernos-produktionskette.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
name: lernOS Produktionskette
on: push
jobs:
convert_via_pandoc:
runs-on: ubuntu-latest
steps:
# Repository auschecken, damit Workflow es nutzen kann
- uses: actions/checkout@v3
# Delete Old Versions
- run: rm -rf ./de/${{ github.event.repository.name }}-guide.*
- run: rm -rf ./docs/de/*
# Create Chapter List
- name: Create Chapter List
id: chapter_list
run: echo "chapters=$(printf '%s ' ./de/src/[0-9]*.md)" >> "$GITHUB_OUTPUT"
# Create Microsoft Word Version (docx)
- uses: docker://pandoc/core
with:
args: >-
./de/metadata.yaml
--standalone
--resource-path=./de/src
--number-sections
--toc
-V lang=de-de
--output=./de/${{ github.event.repository.name }}-guide.docx
./de/src/index.md ${{ steps.chapter_list.outputs.chapters }}
# Create HTML Version (html)
- uses: docker://pandoc/core
with:
args: >-
./de/metadata.yaml
--standalone
--resource-path=./de/src
--number-sections
--toc
-V lang=de-de
--output=./de/${{ github.event.repository.name }}-guide.html
./de/src/index.md ${{ steps.chapter_list.outputs.chapters }}
# Create eBook Version (epub)
- uses: docker://pandoc/core
with:
args: >-
./de/metadata.yaml
--standalone
--resource-path=./de/src
--number-sections
--toc
-V lang=de-de
--output=./de/${{ github.event.repository.name }}-guide.epub
./de/src/index.md ${{ steps.chapter_list.outputs.chapters }}
# Create PDF Version (pdf)
- uses: docker://pandoc/extra
with:
args: >-
./de/metadata.yaml
--standalone
--resource-path=./de/src
--number-sections
--toc
-V lang=de-de
--template /.pandoc/templates/eisvogel.latex
--output=./de/${{ github.event.repository.name }}-guide.pdf
./de/src/index.md ${{ steps.chapter_list.outputs.chapters }}
# Create Web Version (mkdocs)
- uses: actions/setup-python@v4
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material
- run: mkdocs build -f ./de/mkdocs.yml
# Geänderte Datein zurück ins Repository committen
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Erzeugt von automatischer lernOS Produktionskette