Merge pull request #50 from bhawnasehgal/main #31
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: "Sphinx: Render docs" | |
on: | |
push: | |
branches: | |
main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- run: lsb_release -a | |
- run: uname -a | |
- name: Checkout repository | |
uses: actions/checkout@master | |
- name: Setup Python | |
uses: actions/setup-python@master | |
with: | |
python-version: '3.10' | |
- name: Install build dependencies | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended | |
- name: Upgrade pip | |
run: python3 -m pip install --upgrade pip | |
- name: Install python dependencies | |
run: pip install -r requirements.txt | |
- name: Build HTML | |
run: | | |
make html | |
- if: github.repository_owner == 'upsidedownlabs' | |
name: Upload CNAME | |
run: mv _build/html/_static/CNAME _build/html | |
- name: Build PDF | |
run: | | |
make latexpdf | |
mv _build/latex/*.pdf _build/html | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: docs | |
path: _build/html/ | |
- name: Deploy HTML | |
uses: peaceiris/actions-gh-pages@v3 | |
if: github.ref == 'refs/heads/main' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: _build/html | |