From acffb405d306820db7bbfead1c129b1a3252ba6c Mon Sep 17 00:00:00 2001 From: Brian Toby Date: Thu, 16 Jan 2025 09:11:34 -0600 Subject: [PATCH] Update test_build.yml --- .github/workflows/test_build.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test_build.yml b/.github/workflows/test_build.yml index 3ac3235..34fad72 100644 --- a/.github/workflows/test_build.yml +++ b/.github/workflows/test_build.yml @@ -20,19 +20,23 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Find tutorials + - name: convert tutorials run: | cd MDtutorials - ls for path in ./*; do - [ -d "${path}" ] || continue # if not a directory, skip + [ -d "${path}" ] || continue # skip if not a directory dirname="$(basename "${path}")" - mkdir -v ../$dirname + dest="../$dirname) + mkdir -v ${dest} + [ -d "${path}/data" ] || cp -rv "${path}/data" ${dest}/ + [ -d "${path}/imgs" ] || cp -rv "${path}/imgs" ${dest}/ + cp -v tutorial.css ${dest} for fil in $dirname/*.md; do echo $fil - ls -l $fil + outfile="${dest}/$(basename "${fil%.md}.html")" + echo $outfile + pandoc --standalone ${fil} --css tutorial.css -o ${outfile} + sed -i '' 's/
/
/g' ${outfile} done done - which pandoc - which sed