ci: update main.yml #11
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: Deploy LaTeX to HTML | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@main | |
- name: Setup TeX Live | |
run: | | |
sudo apt-get update -q | |
sudo apt-get install -y texlive-xetex texlive-fonts-recommended texlive-fonts-extra | |
- name: Download Kalpurush font | |
run: | | |
mkdir -p ./assets | |
wget -O ./assets/Kalpurush.ttf https://raw.githubusercontent.com/mrsumanbiswas/dsav-math-project/main/assets/Kalpurush.ttf | |
- name: Compile LaTeX to HTML | |
run: | | |
xelatex -shell-escape -interaction=nonstopmode -halt-on-error main.tex | |
htlatex main.tex "xhtml, charset=utf-8" " -cunihtf -utf8" | |
mkdir -p docs | |
mv *.html *.css docs/ | |
mv img docs/ | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@main | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs |