-
Notifications
You must be signed in to change notification settings - Fork 12
93 lines (78 loc) · 2.42 KB
/
publish.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
name: Build and Deploy
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build:
name: Build Files
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: 'yarn'
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- name: Install and cache ffmpeg (all OS)
uses: FedericoCarboni/setup-ffmpeg@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
id: setup-ffmpeg
- name: Setup TinyTeX
uses: r-lib/actions/setup-tinytex@v2
- name: Install extra Latex packages
run: |
tlmgr install standalone everysel preview doublestroke ms setspace rsfs relsize ragged2e fundus-calligra microtype wasysym physics dvisvgm jknapltx wasy cm-super babel-english gnu-freefont mathastext cbfonts-fd
latex --version
- name: Install Pip Dependencies
run: |
cd scripts
pip install -r requirements.txt
- name: Build Manim Examples and json files
env:
TOKEN_FOR_API_GITHUB_PRIVATE: ${{ secrets.TOKEN_FOR_API_GITHUB_PRIVATE }}
run: |
python scripts/build.py
- name: Install Yarn Dependencies
run: |
yarn install --network-timeout 100000
- name: Build Site
run: |
yarn build
- name: Upload Artifacts 🔺
uses: actions/upload-artifact@v1
with:
name: public
path: public/
deploy:
name: Deploy Site
needs: [build] # The second job must depend on the first one to complete before running, and uses ubuntu-latest instead of windows.
runs-on: ubuntu-latest
if: github.repository_owner == 'ManimCommunity' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Download Artifacts 🔻 # The built project is downloaded into the 'site' folder.
uses: actions/download-artifact@v1
with:
name: public
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
BRANCH: gh-pages
FOLDER: public
single-commit: true