-
Notifications
You must be signed in to change notification settings - Fork 9
57 lines (55 loc) · 1.75 KB
/
deploy_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
name: Deploy OpenTurbine Documentation
on:
push:
paths:
- docs/**
- .github/workflows/deploy_docs.yaml
jobs:
Deploy-Docs:
runs-on: ubuntu-latest
steps:
- name: Cache install source dependencies
id: cache-dependencies
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/spack
key: linux-spack
- name: Install source dependencies
if: steps.cache-dependencies.outputs.cache-hit != 'true'
run: |
git clone https://github.com/spack/spack.git
source spack/share/spack/setup-env.sh
spack compiler find
spack install yaml-cpp
spack install trilinos@master~epetra ^kokkos-kernels+blas+lapack
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Clone repository
uses: actions/checkout@v4
with:
path: openturbine
- name: Install documentation dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends graphviz libenchant-2-dev doxygen
python3 -m pip install --upgrade pip
pip install -r openturbine/docs/requirements.txt
- name: Build OpenTurbine with documentation
run: |
source spack/share/spack/setup-env.sh
spack load trilinos yaml-cpp
cd openturbine
mkdir build
cd build
cmake .. \
-DOpenTurbine_ENABLE_TESTS=OFF \
-DOpenTurbine_ENABLE_DOCUMENTATION=ON \
-DCMAKE_BUILD_TYPE=Release
cmake --build .
- name: Deploy Documentation
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{ github.workspace }}/openturbine/build/docs/sphinx/html