-
-
Notifications
You must be signed in to change notification settings - Fork 69
83 lines (66 loc) · 2.33 KB
/
generate-offline.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
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
- 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