Use cmakedomain #182
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] | |
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@v3 | |
- name: Install/Configure mamba | |
uses: mamba-org/setup-micromamba@v1 | |
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: pip install -U CMinx myst-parser | |
- name: ⬇️ Setup CMake | |
uses: lukka/get-cmake@latest | |
with: | |
cmakeVersion: ^3 | |
- name: Run CMake | |
run: cmake -S ${{ github.workspace }} -B ${{ github.workspace }}/build -G "Ninja Multi-Config" -Werror=dev -Werror=deprecated -DBUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install | |
- name: Generate docs | |
run: cmake --build ${{ github.workspace }}/build --target docs-all --config Build | |
- name: Install docs | |
run: cmake --install ${{ github.workspace }}/build --config Build | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v2 | |
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@v2 |