This repository was archived by the owner on Feb 7, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (55 loc) · 1.61 KB
/
docs.yml
File metadata and controls
66 lines (55 loc) · 1.61 KB
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
60
61
62
63
64
65
66
# Combination of https://github.com/RobinMagnet/pyFM/blob/master/.github/workflows/documentation.yml
# https://github.com/r-lib/pkgdown/blob/main/.github/workflows/pkgdown.yaml
# and https://github.com/DenverCoder1/doxygen-github-pages-action
name: docs
on:
push:
branches: [main]
pull_request:
branches: [main]
release:
types: [published]
workflow_dispatch:
jobs:
build_documentation:
name: Build Documentation
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: 'StochasticTree/stochtree'
ref: 'cpp_docs'
submodules: 'recursive'
- name: Setup Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pip"
- name: Install Package with Relevant Dependencies
run: |
pip install --upgrade pip
pip install -r cpp_docs/requirements.txt
pip install .
- name: Install doxygen and graphviz
run: |
sudo apt-get install doxygen graphviz -y
- name: Build doxygen XML files
run: |
doxygen cpp_docs/Doxyfile
- name: Build HTML
run: |
sphinx-build -M html cpp_docs/ cpp_docs/_build/
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
path:
cpp_docs/_build/html/
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: cpp_docs/_build/html