-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (55 loc) · 1.71 KB
/
Copy pathdocs.yml
File metadata and controls
66 lines (55 loc) · 1.71 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
name: Docs
# Build the MkDocs + Material site and deploy to GitHub Pages.
#
# One-time manual step (only after this workflow's first successful run):
# GitHub repo Settings > Pages
# Source: Deploy from a branch
# Branch: gh-pages / (root)
#
# The workflow builds the C++ extension (actionet._core) so that
# mkdocstrings can import the package to render docstrings.
on:
push:
branches: [dev]
paths:
- "docs/**"
- "mkdocs.yml"
- "src/actionet/**"
- "pyproject.toml"
- ".github/workflows/docs.yml"
workflow_dispatch:
permissions:
contents: write
concurrency:
group: docs-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-deploy:
name: Build and deploy docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install build prerequisites
run: |
sudo apt-get update
sudo apt-get install -y cmake libhdf5-dev libomp-dev libopenblas-dev liblapack-dev
- name: Build extension and install docs deps
run: |
python -m pip install --upgrade pip
pip install --no-build-isolation -e ".[docs]"
- name: Smoke test (import)
run: |
python -c "import actionet; print('actionet', actionet.__version__)"
- name: Configure git identity for gh-deploy
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Build and deploy to gh-pages
run: mkdocs gh-deploy --force