Skip to content

Merge pull request #319 from William-LP/master #71

Merge pull request #319 from William-LP/master

Merge pull request #319 from William-LP/master #71

name: Generate offline version
on:
push:
workflow_dispatch:
jobs:
generateFile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create output folder
run: mkdir ./output
- run: sudo apt-get update
name: Apt-get update
- name: Install jq
run: sudo apt install jq
- name: Transform data to markdown
run: . ./.github/scripts/generate-markdown.sh
- name: prepare files to include
run: |
ls *.md >> _includes.txt
cat _includes.txt
working-directory: ./markdown
- name: install pandoc
run: sudo apt-get install --assume-yes pandoc
- name: install pdflatex
run: |
sudo apt-get install texlive-latex-base
sudo apt-get install texlive-fonts-recommended
sudo apt-get install texlive-latex-extra
sudo apt-get install texlive-xetex
sudo apt-get install -y cm-super
- name: Build TXT result
run: pandoc -V documentclass=memoir -s $(cat _includes.txt) --toc -o ../output/result.txt
working-directory: ./markdown
- name: Copy assets
run: |
cp assets/* ../output
working-directory: ./markdown
- name: Build PDF version
run: pandoc -s result.txt -o 'AKS-Checklist.pdf' --from markdown --template eisvogel.latex
working-directory: ./output
- name: Build Word version
if: ${{ always() }}
run: pandoc -s result.txt -o 'AKS-Checklist.docx'
working-directory: ./output
- name: Delete useless files
run: |
rm -f background5.pdf
rm -f eisvogel.latex
working-directory: ./output
- name: Azure Blob Storage Upload
uses: bacongobbler/[email protected]
with:
connection_string: ${{ secrets.BLOB_CONNECTION_STRING }}
container_name: $web
source_dir: './output'
extra_args: "--destination-path docs"
overwrite: 'true'
- name: Upload a Build Artifact
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: Offline resources
path: |
./output/AKS-Checklist.pdf
./output/AKS-Checklist.docx
./output/result.txt