Fix ci scripts
Change-Id: I1ba50c6bf57f94f9eb811623aa8d3e8427b39361
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 92ed28b..79961b1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -34,11 +34,6 @@
- locale-gen de_DE.utf8 en_GB.utf8 en_US.utf8
- end_section install_linux_packages
- - start_section testing_chromium "Testing chromium PDF export"
- - ./ci/html2pdf https://google.com test.pdf 1
- - ls -l ./test.pdf
- - end_section testing_chromium
-
- start_section install_fonts "Installing Libertinus and Fira fonts"
- curl -Ls https://github.com/mozilla/Fira/archive/refs/tags/4.202.tar.gz | tar -C /usr/share/fonts -zx --wildcards "*.otf"
- fc-cache
@@ -53,6 +48,11 @@
- R -e 'devtools::install_git("https://korap.ids-mannheim.de/gerrit/IDS-Mannheim/posterdown", dependencies=TRUE)'
- end_section install_r_packages
+ - start_section testing_html2pdf "Testing PDF export"
+ - ./ci/html2pdf https://google.com
+ - ls -l ./google.pdf
+ - end_section testing_html2pdf
+
script:
- start_section installing "Installing posterdown.ids"
- R -e 'devtools::install()'
diff --git a/ci/html2pdf b/ci/html2pdf
index 90a6610..322adcd 100755
--- a/ci/html2pdf
+++ b/ci/html2pdf
@@ -1,13 +1,7 @@
#!/bin/sh -eu
in=$1
-# Get absolute path to preserve relative links
-abs_in=$(realpath "$in")
-work_dir=$(dirname "$abs_in")
-
-# Use Chrome with no shrinking, working from correct directory
-cd "$work_dir"
-R -e "pagedown::chrome_print('$(basename "$abs_in")',
+R -e "pagedown::chrome_print('$in',
options=list(
pageRanges='1',
paperWidth=33.11,