Create old_readme.txt #16
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: lernOS Produktionskette | |
on: push | |
jobs: | |
convert_via_pandoc: | |
runs-on: ubuntu-latest | |
#set permissions to write - vgl. https://github.com/stefanzweifel/git-auto-commit-action/blob/master/README.md | |
permissions: | |
contents: write | |
steps: | |
# Repository auschecken, damit Workflow es nutzen kann | |
- uses: actions/checkout@v3 | |
# Delete Old Versions | |
- run: rm -rf ./de/build/${{ 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 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: pip install mkdocs-rss-plugin | |
- run: mkdocs build -f ./de/mkdocs.yml | |
# Create Microsoft Word Version (docx) | |
- run: mkdir ./docs/de/download | |
- uses: docker://pandoc/core | |
with: | |
args: >- | |
./de/metadata.yaml | |
--standalone | |
--resource-path=./de/src | |
--number-sections | |
--toc | |
-V lang=de-de | |
--output=./docs/de/download/${{ 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/build/${{ 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/build/${{ 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/build/${{ github.event.repository.name }}-guide.pdf | |
./de/src/index.md ${{ steps.chapter_list.outputs.chapters }} | |
# Geänderte Datein zurück ins Repository committen | |
- uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: Erzeugt von automatischer lernOS Produktionskette |