[pre-commit.ci] pre-commit autoupdate #285
This file contains 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: docs | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
defaults: | |
run: | |
shell: bash -l {0} | |
env: | |
CMAKE_VERSION: 3.23.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 texlive-latex-recommended texlive-latex-extra | |
- name: π Install Conda environment | |
uses: mamba-org/provision-with-micromamba@v16 | |
with: | |
environment-file: .github/workflows/micromamba/docs.yml | |
- 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 -DBUILD_ROOT_INTERFACE=OFF -DCMAKE_PREFIX_PATH="~/micromamba" -DCMAKE_INSTALL_PREFIX=${{ env.CMAKE_INSTALL_PREFIX }} | |
- 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 && mv ${{ env.CMAKE_INSTALL_PREFIX }}/share/doc/streamout/pdf/streamout_Manual.pdf ${{ env.CMAKE_INSTALL_PREFIX }}/share/doc/streamout/html/streamout_Manual.pdf | |
- name: π Deploy | |
uses: JamesIves/[email protected] | |
with: | |
token: ${{ secrets.ACCESS_PUBLIC_REPOS }} | |
repository-name: SDHCAL/SDHCAL.github.io | |
branch: main | |
folder: ${{ env.CMAKE_INSTALL_PREFIX }}/share/doc/streamout/html/ | |
target-folder: assets/projects/streamout |