Bump version (#498) #5
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
| name: Build Documentation | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| jobs: | |
| sphinx-build: | |
| runs-on: ubuntu-24.04 | |
| env: | |
| cache-name: python-docs-cache | |
| steps: | |
| - name: Cache Python packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.pip/cache | |
| key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pyproject.toml') }} | |
| - name: Install Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Check out Fab source | |
| uses: actions/checkout@v4 | |
| - name: Install documentation tools | |
| run: pip install .[docs] | |
| - name: Install LaTeX packages | |
| run: | | |
| sudo apt-get update -y | |
| sudo apt-get install -y \ | |
| librsvg2-bin \ | |
| texlive-latex-base \ | |
| texlive-latex-recommended \ | |
| texlive-fonts-recommended \ | |
| texlive-latex-extra \ | |
| latexmk | |
| - name: Build HTML documentation | |
| working-directory: Documentation | |
| run: make clean html | |
| - name: Build PDF documentation | |
| working-directory: Documentation | |
| run: make latexpdf | |
| - name: Copy PDF to HTML build directory | |
| working-directory: Documentation | |
| run: cp -r build/latex build/html/ | |
| - name: Prepare and upload asset | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: Documentation/build/html | |
| deploy-documentation: | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deploy-documentation.outputs.page_url }} | |
| runs-on: ubuntu-24.04 | |
| needs: sphinx-build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |