From 2d29719eee8683aa8cbc840efaeb7cea34ae63ce Mon Sep 17 00:00:00 2001 From: Romane <122701716+rom-vtn@users.noreply.github.com> Date: Thu, 7 May 2026 18:07:08 +0200 Subject: [PATCH] use marp docker image for rendering --- .gitea/workflows/build.yaml | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index c8e835b..d421ade 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -6,31 +6,18 @@ jobs: name: build marp presentation runs-on: ubuntu-latest steps: - - name: restore cache - id: restore-cache - uses: actions/cache@v3 - with: - path: /opt/ - key: marp-renderer-${{ hashFiles('./.gitea/workflows/build.yaml') }} - - name: checkout - uses: actions/checkout@v4 - - name: install marp toolchain - if: steps.restore-cache.outputs.cache-hit != 'true' - run: | - npm i -g -y @marp-team/marp-cli@latest playwright && \ - PLAYWRIGHT_BROWSERS_PATH=/opt/browsers playwright install --with-deps chrome - - name: cache marp installation - if: steps.restore-cache.outputs.cache-hit != 'true' - uses: actions/cache/save@v3 - with: - path: /opt/ - key: marp-renderer-${{ hashFiles('./.gitea/workflows/build.yaml') }} - - name: build presentation + - name: build html presentation working-directory: ./presentation + uses: docker://marpteam/marp-cli:latest + with: + args: ./presentation.md -o ./index.html --html --theme-set ./themes -- + - name: build pdf presentation + working-directory: ./presentation + uses: docker://marpteam/marp-cli:latest + with: + args: --html --allow-local-files -o presentation.pdf --theme-set ./themes -- + - name: compress as zip run: | - export PLAYWRIGHT_BROWSERS_PATH=/opt/browsers && \ - marp presentation.md --html -o index.html --theme-set ./themes -- && \ - marp presentation.md --html --browser-path "/opt/google/chrome/google-chrome" --allow-local-files -o presentation.pdf --theme-set ./themes -- && \ zip -r ../presentation.zip . - name: upload to pages run: |