Skip to content

Commit

Permalink
Disabled PDF rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
royfrancis committed Oct 21, 2024
1 parent d7f3458 commit 34c347c
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,14 @@ jobs:
cd ${PATH_EXPORT}
echo "Generating PDFs ..."
# docker run --rm -u $(id -u ${USER}):$(id -g ${USER}) -v ${PWD}:/rmd ${{ env.REGISTRY }}/${{ env.ORG }}/${{ env.IMAGE }} Rscript -e "l <- list.files('.',pattern='slide.+html');if(length(l)!=0) {for(i in 1:length(l)) pagedown::chrome_print(l[i],extra_args=c('--no-sandbox','--disable-dev-shm-usage','--disable-gpu'))};"
for html_file in slide_*.html; do
if [ -f "$html_file" ]; then
base_name="${html_file%.html}"
pdf_file="${base_name}.pdf"
docker run --rm -u "$(id -u "${USER}"):$(id -g "${USER}")" -v "${PWD}:/slides" astefanutti/decktape:3.12.0 "/slides/${html_file}" "/slides/${pdf_file}"
fi
done
# alternative solution using decktape
# for html_file in slide_*.html; do
# if [ -f "$html_file" ]; then
# base_name="${html_file%.html}"
# pdf_file="${base_name}.pdf"
# docker run --rm -u "$(id -u "${USER}"):$(id -g "${USER}")" -v "${PWD}:/slides" astefanutti/decktape:3.12.0 "/slides/${html_file}" "/slides/${pdf_file}"
# fi
# done
cd ..
# Render canvas version of website by changing _site.yml
Expand Down Expand Up @@ -107,13 +108,14 @@ jobs:
done
echo "Generating PDFs for HTML slides ..."
# docker run --rm -u $(id -u ${USER}):$(id -g ${USER}) -v ${PWD}:/rmd ${{ env.REGISTRY }}/${{ env.ORG }}/${{ env.IMAGE }} Rscript -e "l <- list.files('.',pattern='slide.+html');if(length(l)!=0) {for(i in 1:length(l)) pagedown::chrome_print(l[i],extra_args=c('--no-sandbox','--disable-dev-shm-usage','--disable-gpu'))};"
for html_file in slide_*.html; do
if [ -f "$html_file" ]; then
base_name="${html_file%.html}"
pdf_file="${base_name}.pdf"
docker run --rm -u "$(id -u "${USER}"):$(id -g "${USER}")" -v "${PWD}:/slides" astefanutti/decktape:3.12.0 "/slides/${html_file}" "/slides/${pdf_file}"
fi
done
# alternative solution using decktape
# for html_file in slide_*.html; do
# if [ -f "$html_file" ]; then
# base_name="${html_file%.html}"
# pdf_file="${base_name}.pdf"
# docker run --rm -u "$(id -u "${USER}"):$(id -g "${USER}")" -v "${PWD}:/slides" astefanutti/decktape:3.12.0 "/slides/${html_file}" "/slides/${pdf_file}"
# fi
# done
cd ..
# List folder contents
Expand Down

0 comments on commit 34c347c

Please sign in to comment.