|
| 1 | +name: Create PDF release from markdown |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + workflow_dispatch: |
| 8 | + |
| 9 | +jobs: |
| 10 | + convert_via_pandoc_and_release: |
| 11 | + runs-on: ubuntu-18.04 |
| 12 | + steps: |
| 13 | + - uses: actions/checkout@v2 |
| 14 | + - run: | |
| 15 | + mkdir .old && |
| 16 | + rsync -vr ./* .old/ --exclude .old && |
| 17 | + awk '/!\[/{gsub(/<!--/,"{");gsub(/-->/,"}")};{gsub("<!--pagebreak-->","\\pagebreak")};{gsub("<!--newpage-->","\\newpage")};{gsub("<!--clearpage-->","\\clearpage")};{gsub("<!----------","---")};{gsub("---------->","...")};{print}' .old/ABWL-LEDER/README.md > ABWL-LEDER/README.md && |
| 18 | + awk '/!\[/{gsub(/<!--/,"{");gsub(/-->/,"}")};{gsub("<!--pagebreak-->","\\pagebreak")};{gsub("<!--newpage-->","\\newpage")};{gsub("<!--clearpage-->","\\clearpage")};{gsub("<!----------","---")};{gsub("---------->","...")};{print}' .old/ASM-GUENTHER/README.md > ASM-GUENTHER/README.md && |
| 19 | + awk '/!\[/{gsub(/<!--/,"{");gsub(/-->/,"}")};{gsub("<!--pagebreak-->","\\pagebreak")};{gsub("<!--newpage-->","\\newpage")};{gsub("<!--clearpage-->","\\clearpage")};{gsub("<!----------","---")};{gsub("---------->","...")};{print}' .old/DBS-DORENDORF/README.md > DBS-DORENDORF/README.md && |
| 20 | + awk '/!\[/{gsub(/<!--/,"{");gsub(/-->/,"}")};{gsub("<!--pagebreak-->","\\pagebreak")};{gsub("<!--newpage-->","\\newpage")};{gsub("<!--clearpage-->","\\clearpage")};{gsub("<!----------","---")};{gsub("---------->","...")};{print}' .old/PRO-KASCHE/README.md > PRO-KASCHE/README.md && |
| 21 | + awk '/!\[/{gsub(/<!--/,"{");gsub(/-->/,"}")};{gsub("<!--pagebreak-->","\\pagebreak")};{gsub("<!--newpage-->","\\newpage")};{gsub("<!--clearpage-->","\\clearpage")};{gsub("<!----------","---")};{gsub("---------->","...")};{print}' .old/SWE-KASCHE/README.md > SWE-KASCHE/README.md |
| 22 | + - run: | |
| 23 | + mkdir output |
| 24 | + - uses: docker://rstropek/pandoc-latex:latest # generate ABWL-LEDER pdf |
| 25 | + with: |
| 26 | + args: --output=output/ABWL-LEDER.pdf --resource-path=ABWL-LEDER/ --template https://raw.githubusercontent.com/Wandmalfarbe/pandoc-latex-template/v1.4.0/eisvogel.tex --pdf-engine=xelatex --listings -f markdown+raw_tex --verbose ABWL-LEDER/README.md |
| 27 | + - uses: docker://rstropek/pandoc-latex:latest # generate ASM-GUENTHER pdf |
| 28 | + with: |
| 29 | + args: --output=output/ASM-GUENTHER.pdf --resource-path=ASM-GUENTHER/ --template https://raw.githubusercontent.com/Wandmalfarbe/pandoc-latex-template/v1.4.0/eisvogel.tex --pdf-engine=xelatex --listings -f markdown+raw_tex --verbose ASM-GUENTHER/README.md |
| 30 | + - uses: docker://rstropek/pandoc-latex:latest # generate DBS-DORENDORF pdf |
| 31 | + with: |
| 32 | + args: --output=output/DBS-DORENDORF.pdf --resource-path=DBS-DORENDORF/ --template https://raw.githubusercontent.com/Wandmalfarbe/pandoc-latex-template/v1.4.0/eisvogel.tex --pdf-engine=xelatex --listings -f markdown+raw_tex --verbose DBS-DORENDORF/README.md |
| 33 | + - uses: docker://rstropek/pandoc-latex:latest # generate PRO-KASCHE pdf |
| 34 | + with: |
| 35 | + args: --output=output/PRO-KASCHE.pdf --resource-path=PRO-KASCHE/ --template https://raw.githubusercontent.com/Wandmalfarbe/pandoc-latex-template/v1.4.0/eisvogel.tex --pdf-engine=xelatex --listings -f markdown+raw_tex --verbose PRO-KASCHE/README.md |
| 36 | + - uses: docker://rstropek/pandoc-latex:latest # generate SWE-KASCHE pdf |
| 37 | + with: |
| 38 | + args: --output=output/SWE-KASCHE.pdf --resource-path=SWE-KASCHE/ --template https://raw.githubusercontent.com/Wandmalfarbe/pandoc-latex-template/v1.4.0/eisvogel.tex --pdf-engine=xelatex --listings -f markdown+raw_tex --verbose SWE-KASCHE/README.md |
| 39 | + - uses: actions/upload-artifact@master # upload pdfs as an artifact |
| 40 | + with: |
| 41 | + name: output |
| 42 | + path: output |
| 43 | + - uses: meeDamian/github-release@2.0 # create/override a release and attach a pdf |
| 44 | + with: |
| 45 | + token: ${{ secrets.ACCESS_TOKEN }} |
| 46 | + tag: pdf-release |
| 47 | + name: PDFs |
| 48 | + body: Automated release |
| 49 | + gzip: false |
| 50 | + files: output/ABWL-LEDER.pdf |
| 51 | + allow_override: true |
| 52 | + - uses: meeDamian/github-release@2.0 # override release to attach another pdf |
| 53 | + with: |
| 54 | + token: ${{ secrets.ACCESS_TOKEN }} |
| 55 | + tag: pdf-release |
| 56 | + name: PDFs |
| 57 | + body: Automated release |
| 58 | + gzip: false |
| 59 | + files: output/DBS-DORENDORF.pdf |
| 60 | + allow_override: true |
| 61 | + - uses: meeDamian/github-release@2.0 # override release to attach another pdf |
| 62 | + with: |
| 63 | + token: ${{ secrets.ACCESS_TOKEN }} |
| 64 | + tag: pdf-release |
| 65 | + name: PDFs |
| 66 | + body: Automated release |
| 67 | + gzip: false |
| 68 | + files: output/ASM-GUENTHER.pdf |
| 69 | + allow_override: true |
| 70 | + - uses: meeDamian/github-release@2.0 # override release to attach another pdf |
| 71 | + with: |
| 72 | + token: ${{ secrets.ACCESS_TOKEN }} |
| 73 | + tag: pdf-release |
| 74 | + name: PDFs |
| 75 | + body: Automated release |
| 76 | + gzip: false |
| 77 | + files: output/SWE-KASCHE.pdf |
| 78 | + allow_override: true |
0 commit comments