-
Notifications
You must be signed in to change notification settings - Fork 12
59 lines (46 loc) · 1.64 KB
/
docs.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: doxygen-docs
on: [push, pull_request]
defaults:
run:
shell: bash -e -l {0}
jobs:
build_docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set conda environment
uses: mamba-org/setup-micromamba@main
with:
environment-name: myenv
environment-file: environment-dev.yml
init-shell: bash
cache-downloads: true
- name: Configure using CMake
run: cmake -G Ninja -Bbuild -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DBUILD_DOCS=ON
- name: Build docs target
run: cmake --build build --target docs
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: build/docs/html
deploy:
# only run on main branch
if: github.ref == 'refs/heads/main' && github.repository == 'man-group/sparrow'
# Add a dependency to the build job
needs: build_docs
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
contents: read # to read the Pages artifact
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action