-
Notifications
You must be signed in to change notification settings - Fork 1
105 lines (92 loc) · 2.62 KB
/
deploy_pages.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages
on:
# Runs on pushes targeting the default branch
push:
branches: [main]
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allow one concurrent deployment
concurrency:
group: pages
cancel-in-progress: true
env:
FILE: 'slides.py' # Source file where scenes are defined
MANIM: 'manim' # manim or manimgl - which Manim renderer to use
SCENES: 'Introduction WithTeX Outro' # Space-separated list of scenes to render
USES_TEX: true # true or false - disabling this will make the action run faster
DISPLAY: :99 # Do not touch this
jobs:
# Single deploy job since we're just deploying
deploy:
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: pip
- name: Install manim dependencies on Ubuntu
if: ${{ env.MANIM == 'manim' }}
run: |
sudo apt-get update
sudo apt-get install libcairo2-dev libpango1.0-dev ffmpeg freeglut3-dev
- name: Install manimgl dependencies on Ubuntu
if: ${{ env.MANIM == 'manimgl' }}
run: |
sudo apt-get update
sudo apt-get install libpango1.0-dev ffmpeg freeglut3-dev xvfb
nohup Xvfb $DISPLAY &
- name: Setup TeX Live
if: ${{ env.USES_TEX == 'true' }}
uses: teatimeguest/setup-texlive-action@v2
with:
packages: >-
amsmath
babel-english
cbfonts-fd
cm-super
ctex
doublestroke
dvisvgm
everysel
fontspec
frcursive
fundus-calligra
gnu-freefont
jknapltx
latex-bin
mathastext
microtype
ms
physics
preview
ragged2e
relsize
rsfs
setspace
standalone
tipa
wasy
wasysym
xcolor
xetex
xkeyval
- name: Install Python dependencies
run: pip install -r requirements.txt
- name: Build HTML
run: |
${{ env.MANIM }} ${{ env.FILE }} ${{ env.SCENES }}
manim-slides convert ${{ env.SCENES }} _site/index.html
- name: Push to gh-pages branch
if: github.event_name != 'pull_request'
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: gh-pages
FOLDER: _site
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}