Skip to content

Documentation

Documentation #2110

Workflow file for this run

#
# Copyright 2023 Antony Peacock
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
# persons to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
# Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
name: Documentation
on:
schedule:
- cron: "0 2 * * *" # Every day at 02:00 UTC
push:
branches: [main]
pull_request:
branches: [main]
env:
BUILD_TYPE: Debug
COMPILER_VERSION: 13
jobs:
documentation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
- name: Install Compiler
uses: ./.github/actions/setup-compiler
with:
compiler-type: GCC
compiler-version: ${{ env.COMPILER_VERSION }}
stdlib: libstdc++11
os: Linux
- name: Setup Python
uses: ./.github/actions/setup-python
- name: Cache Conan Restore
uses: ./.github/actions/conan-cache-restore
with:
os: Linux
build-type: ${{ env.BUILD_TYPE }}
conan-compiler: gcc
compiler-version: ${{ env.COMPILER_VERSION }}
stdlib: libstdc++11
cache-suffix: "documentation"
- name: Setup Conan
uses: ./.github/actions/setup-conan
with:
build-type: ${{ env.BUILD_TYPE }}
compiler-type: GCC
compiler-version: ${{ env.COMPILER_VERSION }}
conan-compiler: gcc
stdlib: libstdc++11
cppstd: "20"
generator: "Ninja Multi-Config"
- name: Conan Install
shell: bash
run: |
conan install "${{ github.workspace }}" --build missing -o build_docs=True
- name: Configure CMake
shell: bash
run: |
if [ -f build/generators/conanbuild.sh ]; then
source build/generators/conanbuild.sh
fi
cmake --preset ${{ env.CONAN_CONFIGURE_PRESET }} -DMORPHEUS_BUILD_DOCUMENTATION:BOOL=ON
- name: Build Documentation
shell: bash
run: |
if [ -f build/generators/conanbuild.sh ]; then
source build/generators/conanbuild.sh
fi
cmake --build --preset ${{ env.CONAN_BUILD_PRESET }} --target Documentation
- name: Deploy to GH Pages
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3.9.3
with:
github_token: ${{ github.token }}
publish_dir: "./build/documentation/sphinx"
- name: Cache Conan Save
uses: ./.github/actions/conan-cache-save