update classical mechanics #40
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: github pages | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- trees/** | |
- assets/** | |
- .github/workflows/publish.yml | |
pull_request: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
node-version: [19.x] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
fetch-depth: 1 | |
- name: "Setup TeX Live" | |
uses: teatimeguest/setup-texlive-action@v3 | |
with: | |
packages: >- | |
scheme-medium | |
standalone | |
mlmodern | |
amsfonts | |
amsmath | |
zx-calculus | |
tikz-cd | |
l3packages | |
dvisvgm | |
pgf | |
etoolbox | |
mathtools | |
stmaryrd | |
newtx | |
newpx | |
xstring | |
xpatch | |
fontaxes | |
kastrup | |
spath3 | |
- name: "Check `tlmgr` version" | |
run: tlmgr --version | |
- name: "Set-up OCaml" | |
uses: ocaml/setup-ocaml@v2 | |
with: | |
ocaml-compiler: "5.1" | |
- name: Install Forester | |
run: | | |
sudo apt install libev-dev | |
opam install -y forester | |
# git clone https://git.sr.ht/~jonsterling/ocaml-forester | |
# cd ocaml-forester | |
# opam pin add -y . --locked | |
- name: "Build forest" | |
run: make release | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
registry-url: https://registry.npmjs.org | |
- name: "Convert to Static Rendered KaTeX" | |
run: | | |
cp ./theme/package.json . | |
cp ./theme/package-lock.json . | |
npm ci | |
node ./theme/javascript-source/convert.js | |
- name: "Deploy" | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./output | |
publish_branch: gh-pages |