From c9ef5e9a75ce464564ad34f7fd4106d01ffa928a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Eertmans?= Date: Mon, 8 May 2023 17:43:58 +0200 Subject: [PATCH] fix(pages): missing assets (#183) * fix(pages): missing assets This is a PR to try understanding why some assets are not present * fix(ci): correct path * fix(ci): fix path.. * chore(ci): add debug * chore(ci): more and more debug --- .github/workflows/pages.yml | 14 ++++++++++---- manim_slides/convert.py | 2 ++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 0c2c9c7..6055b18 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -54,12 +54,16 @@ jobs: with: path: media key: ${{ runner.os }}-media - - name: Build animation and convert it into HTML slides + - name: Build animations run: | poetry run manim example.py ConvertExample BasicExample ThreeDExample - poetry run manim-slides convert ConvertExample docs/source/_static/slides.html -ccontrols=true - poetry run manim-slides convert BasicExample docs/source/_static/basic_example.html -ccontrols=true - poetry run manim-slides convert ThreeDExample docs/source/_static/three_d_example.html -ccontrols=true + - name: Convert animations to HTML slides + run: | + poetry run manim-slides convert -v DEBUG ConvertExample docs/source/_static/slides.html -ccontrols=true + poetry run manim-slides convert -v DEBUG BasicExample docs/source/_static/basic_example.html -ccontrols=true + poetry run manim-slides convert -v DEBUG ThreeDExample docs/source/_static/three_d_example.html -ccontrols=true + - name: Show docs/source/_static/ dir content (video only) + run: tree -L 3 docs/source/_static/ -P '*.mp4' - name: Clear cache run: | gh extension install actions/gh-actions-cache @@ -80,6 +84,8 @@ jobs: with: # Upload docs/build/html dir path: docs/build/html/ + - name: Show docs/build/html/_static/ dir content (video only) + run: tree -L 3 docs/build/html/_static/ -P '*.mp4' - name: Deploy to GitHub Pages id: deployment if: github.event_name != 'pull_request' diff --git a/manim_slides/convert.py b/manim_slides/convert.py index a58862c..aec1533 100644 --- a/manim_slides/convert.py +++ b/manim_slides/convert.py @@ -349,6 +349,8 @@ class RevealJS(Converter): ) full_assets_dir = dirname / assets_dir + logger.debug(f"Assets will be saved to: {full_assets_dir}") + os.makedirs(full_assets_dir, exist_ok=True) for presentation_config in self.presentation_configs: