diff --git a/.github/workflows/ebnf.yml b/.github/workflows/ebnf.yml index d34135ec09..cbdf4271ae 100644 --- a/.github/workflows/ebnf.yml +++ b/.github/workflows/ebnf.yml @@ -44,14 +44,15 @@ jobs: "-Dantlr2ebnf.margin=40" - run: | set -x - cp eo-parser/target/ebnf/org/eolang/parser/Program.pdf . - pdfcrop --margins '10 10 10 10' Program.pdf crop.pdf - pdf2svg crop.pdf ebnf.svg - convert -density 300 -quality 100 -transparent white -colorspace RGB crop.pdf ebnf.png - ls -al - mkdir gh-pages - cp ebnf.png gh-pages - cp ebnf.svg gh-pages + for p in Program Phi; do + cp "eo-parser/target/ebnf/org/eolang/parser/${p}.pdf" . + pdfcrop --margins '10 10 10 10' "${p}.pdf" "${p}-cropped.pdf" + pdf2svg "${p}-cropped.pdf" "${p}.svg" + convert -density 300 -quality 100 -transparent white -colorspace RGB "${p}-cropped.pdf" "${p}.png" + mkdir -p gh-pages/ebnf + cp "${p}.png" gh-pages/ebnf + cp "${p}.svg" gh-pages/ebnf + done - uses: JamesIves/github-pages-deploy-action@v4.5.0 with: branch: gh-pages