mirror of
https://github.com/jeertmans/manim-slides.git
synced 2025-07-04 15:37:58 +08:00
chore(ci): improve docs build (#113)
* chore(ci): improve docs build * fix(ci): trying to fix cache dir * chore(ci): split caching in two steps
This commit is contained in:
16
.github/workflows/pages.yml
vendored
16
.github/workflows/pages.yml
vendored
@ -6,6 +6,8 @@ on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
|
||||
pull_request:
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
@ -45,17 +47,31 @@ jobs:
|
||||
run: pip install manim sphinx sphinx_click furo
|
||||
- name: Install local Python package
|
||||
run: poetry install --with docs
|
||||
- name: Restore cached media
|
||||
id: cache-media-restore
|
||||
uses: actions/cache/restore@v3
|
||||
with:
|
||||
path: media
|
||||
key: ${{ runner.os }}-media
|
||||
- name: Build animation and convert it into HTML slides
|
||||
run: |
|
||||
poetry run manim example.py ConvertExample
|
||||
poetry run manim-slides convert ConvertExample docs/source/_static/slides.html -ccontrols=true
|
||||
- name: Save media to cache
|
||||
id: cache-media-save
|
||||
uses: actions/cache/save@v3
|
||||
with:
|
||||
path: media
|
||||
key: ${{ steps.cache-media-restore.outputs.cache-primary-key }}
|
||||
- name: Build docs
|
||||
run: cd docs && poetry run make html
|
||||
- name: Upload artifact
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: actions/upload-pages-artifact@v1
|
||||
with:
|
||||
# Upload docs/build/html dir
|
||||
path: 'docs/build/html/'
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: actions/deploy-pages@v1
|
||||
|
Reference in New Issue
Block a user