Skip to content

[pre-commit.ci] pre-commit autoupdate #511

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #511

Workflow file for this run

---
name: docs
on:
push:
paths-ignore:
- .github/workflows/**
- '!.github/workflows/docs.yml'
pull_request:
paths-ignore:
- .github/workflows/**
- '!.github/workflows/docs.yml'
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@v6
- name: πŸ“‚ Load .env file
if: hashFiles('.github/workflows/.env') != ''
uses: xom9ikk/dotenv@v2.3.0
with:
path: .github/workflows
- name: πŸ“‚ Load .env file
if: hashFiles('.github/workflows/.env') != ''
uses: xom9ikk/dotenv@v2.3.0
with:
path: .github/workflows
mode: docs
- 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: ${{ env.MAMBA_ENVIRONMENT }}
- name: ⬇️ Install python packages
run: ${{ env.MAMBA_ROOT_PREFIX }}/envs/${{ env.MAMBA_ENVIRONMENT }}/bin/python -m pip install ${{ env.PIP_PACKAGES }}
- name: ⬇️ Install TinyTeX
uses: r-lib/actions/setup-tinytex@v2
env:
TINYTEX_INSTALLER: ${{ env.TINYTEX_INSTALLER }}
- name: ⬇️ Install LaTeX packages
run: |
tlmgr install ${{ env.TINYTEX_PACKAGES }}
tlmgr list --only-installed
- name: ⬇️ Setup CMake
uses: lukka/get-cmake@latest
with:
cmakeVersion: ^3
ninjaVersion: ~1
- name: βš™οΈ run-cmake (configure)
uses: cmake-tools/run-cmake@v0-alpha
id: configure
with:
mode: configure
source_dir: ${{ env.CMAKE_SOURCE_PREFIX }}
install_prefix: ${{ github.workspace }}/${{ env.CMAKE_INSTALL_PREFIX }}
variables: |
CMAKE_PROGRAM_PATH=${{ env.MAMBA_ROOT_PREFIX }}/envs/${{ env.MAMBA_ENVIRONMENT }}/bin
CMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }}
CMMM_BUILD_TESTS=OFF
list_cache_variables: advanced
- name: πŸ› οΈ run-cmake (build)
uses: cmake-tools/run-cmake@v0-alpha
id: build
with:
mode: build
clean_first: true
build_targets: |
docs-all
build_verbose: true
- name: πŸ“₯ run-cmake (install)
uses: cmake-tools/run-cmake@v0-alpha
id: install
with:
mode: install
strip: true
install_verbose: true
- name: πŸš› Move pdf files
run: cmake -E copy ${{ env.CMAKE_INSTALL_PREFIX }}/share/doc/pdf/cmmm.pdf ${{ env.CMAKE_INSTALL_PREFIX }}/share/doc/html/pdf/cmmm.pdf
- name: ⬇️ Setup Pages
uses: actions/configure-pages@v5
- name: πŸ“₯ Upload artifact
uses: actions/upload-pages-artifact@v4
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