-
Notifications
You must be signed in to change notification settings - Fork 5
44 lines (42 loc) · 1.7 KB
/
pandoc.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
name: Generate PDF
on: push
jobs:
convert_via_pandoc:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- run: mkdir output
- name: Set date
run: |
echo "schvaleno=`.pandoc/getdate.rb`" >> $GITHUB_ENV
- name: Generate HTML
uses: docker://pandoc/core:2.11.2
with:
args: >-
--standalone
--from markdown+ascii_identifiers
--metadata title="Politický program Svobodných"
-V date="Schváleno ReV dne ${{ env.schvaleno }}"
--shift-heading-level-by=0
-V margin-top=15
-V margin-left=15
-V margin-right=15
-V margin-bottom=15
-V papersize=a4
--output=output/program.html
-t html5
-V default-header
-H .pandoc/header.html
README.md
- run: sudo apt-get update
- name: Install wkhtmltopdf
run: |
sudo apt-get install xvfb libfontconfig wget
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb
sudo apt install -f ./wkhtmltox_0.12.5-1.bionic_amd64.deb
- name: Generate PDF
run: xvfb-run wkhtmltopdf --page-size a4 --title "Politický program Svobodných" --margin-bottom 35 --margin-top 15 --margin-right 0 --margin-left 0 --enable-local-file-access --header-spacing 12 --header-html .wkhtmltopdf/header.html --footer-spacing 12 --footer-html .wkhtmltopdf/footer.html --replace "schvaleno" "${{ env.schvaleno }}" output/program.html output/program.pdf
- uses: actions/upload-artifact@master
with:
name: output
path: output