1
0
Fork 0
mirror of https://github.com/TheLartians/ModernCppStarter.git synced 2025-08-30 13:41:13 +02:00
ModernCppStarter/.github/workflows/documentation.yaml
Lars Melchior 8ba41ae49c
Update CPM.cmake and cache dependencies in workflows (#70)
* update CPM.cmake to 0.28.0

* cache CPM.cmake dependencies

* create modules directory if it doesn't exist on windows

* experiment with env variable

* experiment 2

* experiment 3

* use env for all workflows

* make cache keys OS dependent

* replace env.GITHUB_ with github.workspace

* format workflow files

* update cache key

* use unique key for each workflow
2021-01-20 19:00:20 +01:00

36 lines
866 B
YAML

name: Documentation
on:
push:
tags:
- "*"
jobs:
build:
name: Build and publish documentation
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- uses: actions/cache@v2
with:
path: "**/cpm_modules"
key: ${{ github.action }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
- name: Install dependencies
run: |
brew install doxygen
pip3 install jinja2 Pygments
- name: Build
env:
CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules
run: |
cmake -Sdocumentation -Bbuild
cmake --build build --target GenerateDocs
- name: Publish
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/doxygen/html