Skip to content

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

[pre-commit.ci] pre-commit autoupdate

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

Workflow file for this run

---
name: Docs
on:
push:
branches:
- main
pull_request:
defaults:
run:
shell: bash -l {0}
env:
CMAKE_VERSION: 3.16.x
CMAKE_BUILD_TYPE: Release
CMAKE_BUILD_PREFIX: ./build
CMAKE_INSTALL_PREFIX: ./install
jobs:
docs:
runs-on: ubuntu-latest
name: πŸ“š Docs
steps:
- name: 🧰 Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: 🟨 Install packages
run: sudo apt-get install dia mscgen inkscape
- name: 🐍 Install Conda environment
uses: mamba-org/provision-with-micromamba@v16
with:
environment-file: .github/micromamba/docs.yml
- name: 🟨 Install miktex
run: |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D6BC243565B2087BC3F897C9277A7293F59E4889
echo "deb http://miktex.org/download/ubuntu focal universe" | sudo tee /etc/apt/sources.list.d/miktex.list
sudo apt-get update
sudo apt-get install miktex
sudo miktexsetup --shared=yes finish
sudo initexmf --admin --set-config-value [MPM]AutoInstall=1
- name: 🟨 Setup CMake
uses: jwlawson/[email protected]
with:
cmake-version: ${{env.CMAKE_VERSION}}
github-api-token: ${{ secrets.GITHUB_TOKEN }}
- name: πŸ”§ Configure
run: cmake -S . -B ${{ env.CMAKE_BUILD_PREFIX }} -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -DBUILD_DOCS=ON -DCMAKE_PREFIX_PATH="~/micromamba"
- name: βš™οΈ Build
run: cmake --build ${{ env.CMAKE_BUILD_PREFIX }} --config ${{ env.CMAKE_BUILD_TYPE }} --parallel 2 --target all docs
- name: πŸ“₯ Install
run: cmake --install ${{ env.CMAKE_BUILD_PREFIX }} --prefix ${{ env.CMAKE_INSTALL_PREFIX }} --strip
- name: Check PDF Manual
id: check_files
uses: andstor/file-existence-action@v2
with:
files: ${{ env.CMAKE_INSTALL_PREFIX }}/share/doc/CMakeMM/pdf/CMakeMM_Manual.pdf
- name: Move PDF Manual
if: steps.check_files.outputs.files_exists == 'true'
run: mv ${{ env.CMAKE_INSTALL_PREFIX }}/share/doc/CMakeMM/pdf/CMakeMM_Manual.pdf ${{ env.CMAKE_INSTALL_PREFIX }}/share/doc/CMakeMM/html/CMakeMM_Manual.pdf
- name: πŸŽ‰ Deploy
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.REPOS_ACCESS }}
REPOSITORY_NAME: flagarde/docs
BRANCH: main
FOLDER: ${{ env.CMAKE_INSTALL_PREFIX }}/share/doc/CMakeMM/html/
TARGET_FOLDER: CMakeMM