add latex requirements to github workflow #15
This file contains hidden or 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
| # SPDX-FileCopyrightText: 2023 Filip Pokorný (thank you!!) Adapted by aaronkaplan | |
| # SPDX-License-Identifier: AGPL-3.0-or-later | |
| name: "Build and publish documentation" | |
| on: | |
| push: | |
| branches: | |
| - publish | |
| pull_request: | |
| branches: | |
| - publish | |
| release: | |
| types: | |
| - published | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "Checkout repository" | |
| uses: actions/checkout@v3 | |
| - name: "Setup python" | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.x | |
| - name: "Install APT dependencies" | |
| run: | | |
| wget https://github.com/jgm/pandoc/releases/download/3.7.0.2/pandoc-3.7.0.2-1-amd64.deb | |
| apt update | |
| apt install -y ./pandoc-3.7.0.2-1-amd64.deb | |
| apt install -y texlive-latex-extra texlive-fonts-recommended texlive-fonts-extra | |
| tlmgr init-usertree | |
| tlmgr repository add ftp://tug.org/historic/systems/texlive/2021/tlnet-final | |
| tlmgr repository remove https://mirror.ctan.org/systems/texlive/tlnet | |
| tlmgr option repository ftp://tug.org/historic/systems/texlive/2021/tlnet-final | |
| tlmgr install sourcecodepro | |
| - name: "Install Python dependencies" | |
| run: | | |
| pip install -r requirements.txt | |
| - name: "Build docs" | |
| run: | | |
| mkdocs build | |
| - name: Setup Pages | |
| if: github.event_name == 'push' | |
| uses: actions/configure-pages@v5 | |
| - name: Upload artifact | |
| if: github.event_name == 'push' | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: 'build/' | |
| - name: Deploy to GitHub Pages | |
| if: github.event_name == 'push' | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |