Skip to content

Commit acffb40

Browse files
authored
Update test_build.yml
1 parent 98d4868 commit acffb40

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

.github/workflows/test_build.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,23 @@ jobs:
2020
- name: Checkout
2121
uses: actions/checkout@v4
2222

23-
- name: Find tutorials
23+
- name: convert tutorials
2424
run: |
2525
cd MDtutorials
26-
ls
2726
for path in ./*; do
28-
[ -d "${path}" ] || continue # if not a directory, skip
27+
[ -d "${path}" ] || continue # skip if not a directory
2928
dirname="$(basename "${path}")"
30-
mkdir -v ../$dirname
29+
dest="../$dirname)
30+
mkdir -v ${dest}
31+
[ -d "${path}/data" ] || cp -rv "${path}/data" ${dest}/
32+
[ -d "${path}/imgs" ] || cp -rv "${path}/imgs" ${dest}/
33+
cp -v tutorial.css ${dest}
3134
for fil in $dirname/*.md; do
3235
echo $fil
33-
ls -l $fil
36+
outfile="${dest}/$(basename "${fil%.md}.html")"
37+
echo $outfile
38+
pandoc --standalone ${fil} --css tutorial.css -o ${outfile}
39+
sed -i '' 's/<figure>/<BR clear=all><figure>/g' ${outfile}
3440
done
3541
done
36-
which pandoc
37-
which sed
3842

0 commit comments

Comments
 (0)