publish #21
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: 2025 Sebastian Wagner, Aaron Kaplan | |
| # 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 | |
| sudo apt update | |
| sudo apt install -y ./pandoc-3.7.0.2-1-amd64.deb | |
| sudo apt install -y texlive-latex-extra texlive-fonts-recommended texlive-fonts-extra | |
| tlmgr init-usertree | |
| version=$(tlmgr --version | awk '/version/ {print $5}') | |
| tlmgr repository add ftp://tug.org/historic/systems/texlive/${version}/tlnet-final | |
| tlmgr repository remove https://mirror.ctan.org/systems/texlive/tlnet | |
| tlmgr option repository ftp://tug.org/historic/systems/texlive/${version}/tlnet-final | |
| tlmgr install sourcecodepro draftwatermark | |
| - 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 |