Skip to content

Merge pull request #14 from cmake-tools/pre-commit-ci-update-config #176

Merge pull request #14 from cmake-tools/pre-commit-ci-update-config

Merge pull request #14 from cmake-tools/pre-commit-ci-update-config #176

Workflow file for this run

---
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 python packages
run: pip install -U sphinx CMinx myst-parser sphinx_rtd_theme
- 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
- name: Generate docs
run: sphinx-build ${{ github.workspace }}/docs/ ${{ github.workspace }}/docs/build -b html
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ${{ github.workspace }}/docs/build
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