-
Notifications
You must be signed in to change notification settings - Fork 6
113 lines (98 loc) · 2.68 KB
/
docs.yml
File metadata and controls
113 lines (98 loc) · 2.68 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Build and deploy manual
on:
pull_request:
branches: [main, dev]
release:
types: [created]
jobs:
builddocs:
name: Build manual
runs-on: ubuntu-24.04
strategy:
matrix:
compiler: [gcc]
python-version: ["3.12"]
rust: [1.62.1]
defaults:
run:
shell: bash
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v6
with:
submodules: true
fetch-depth: 0
- name: Set up rust
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.rust }}
- name: Install cbindgen
uses: baptiste0928/cargo-install@v3
with:
crate: cbindgen
version: "=0.24.3"
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v7
with:
activate-environment: true
version: "latest"
python-version: ${{ matrix.python-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install apt dependencies
run: |
sudo apt install --fix-missing -y libgsl-dev
- name: rustc version
run: |
rustc --version
- name: cbindgen version
run: |
cbindgen --version
- name: uv sync
run: |
uv sync -p ${{ matrix.python-version }} --locked --group build --group doc --no-dev
- name: Build the docs
working-directory: doc
run: |
make
- name: Move built HTML docs
if: github.event_name == 'release'
working-directory: doc
run: |
mv _build/html ../docs_output
- name: Upload artifacts
if: github.event_name == 'release'
uses: actions/upload-artifact@v5
with:
name: docs_output
path: docs_output/
deploy:
name: deploy
needs: builddocs
if: github.event_name == 'release'
runs-on: ubuntu-24.04
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Download artifact
uses: actions/download-artifact@v6.0.0
with:
# Artifact name
name: docs_output # optional
# Destination path
path: docs_output # optional
- name: Deploy to GitHub Pages
uses: Cecilapp/GitHub-Pages-deploy@v3
env:
GITHUB_TOKEN: ${{ secrets.ACTIONS }}
with:
build_dir: docs_output/