Skip to content

pre-commit

pre-commit #408

Workflow file for this run

---
name: docs
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install/Configure mamba
uses: mamba-org/setup-micromamba@v2
with:
environment-file: ${{ github.workspace }}/.github/workflows/mamba/docs.yml
init-shell: bash
cache-environment: true
post-cleanup: all
environment-name: docs
- name: Install python packages
run: ${{ env.MAMBA_ROOT_PREFIX }}/envs/docs/bin/python -m pip install sphinxcontrib-moderncmakedomain
- name: 🟨 Install TinyTeX
uses: r-lib/actions/setup-tinytex@v2
env:
TINYTEX_INSTALLER: TinyTeX-1
- name: 🟨 Install LaTeX packages
run: |
tlmgr install latex-bin amsmath luatex85 hyperref hypcap polyglossia geometry cmap amsfonts luatexbase fncychap kvoptions float wrapfig capt-of framed fancyvrb upquote needspace tabulary varwidth colortbl booktabs parskip fancyhdr titlesec pdftexcmds infwarerr oberdiek ellipse pict2e epstopdf epstopdf-pkg
tlmgr list --only-installed
- name: ⬇️ Setup CMake
uses: lukka/get-cmake@latest
with:
cmakeVersion: ^3
- name: Run CMake
run: cmake -D CMAKE_PROGRAM_PATH=${{ env.MAMBA_ROOT_PREFIX }}/envs/docs/bin -S ${{ github.workspace }} -B ${{ github.workspace }}/build -G "Ninja Multi-Config" -Werror=dev -Werror=deprecated -DCMMM_BUILD_TESTS=OFF -DCMAKE_PREFIX_PATH=${{ env.MAMBA_ROOT_PREFIX
}}/envs/docs/ -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install
- name: Generate docs
run: cmake --build ${{ github.workspace }}/build --target docs-all --config Release
- name: Install docs
run: |
cmake --install ${{ github.workspace }}/build --config Release
cmake -E copy ${{ github.workspace }}/install/share/doc/pdf/cmmm.pdf ${{ github.workspace }}/install/share/doc/html/pdf/cmmm.pdf
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ${{ github.workspace }}/install/share/doc/html/
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4