-
-
Notifications
You must be signed in to change notification settings - Fork 36
93 lines (77 loc) · 2.72 KB
/
docs.yml
File metadata and controls
93 lines (77 loc) · 2.72 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
name: docs
on:
release:
types: [published]
workflow_dispatch:
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install latest nightly Rust
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly
- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Set up Pandoc
uses: r-lib/actions/setup-pandoc@v2
- name: Vendor core Rust logic
run: python scripts/vendor_r.py
- name: Install R dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown, any::devtools, any::roxygen2
working-directory: package-r
- name: Generate R Documentation
run: |
cp README.md package-r/README.md
Rscript -e 'roxygen2::roxygenise("package-r")'
shell: bash
- name: Build R Documentation
run: |
Rscript -e 'pkgdown::build_site("package-r")'
shell: bash
- name: Prepare Build Files
run: |
cp README.md package-python/README_PYTHON.md
cp LICENSE package-python/LICENSE
- name: Build wheels with maturin
uses: PyO3/maturin-action@v1
with:
command: build
args: --release --out dist --interpreter python3.11 --manifest-path package-python/Cargo.toml
- name: Install dependencies
run: |
cd package-python
cp ../README.md README_PYTHON.md
python -m venv .venv
source .venv/bin/activate
# Install dependencies manually to avoid pip build isolation issues with relative paths
pip install numpy typing-extensions pandas polars pyarrow pytest seaborn scikit-learn mkdocs-material "mkdocstrings[python]" mkdocs-autorefs ruff xgboost onnxmltools onnx onnxruntime
pip install sphinx sphinx_rtd_theme numpydoc nbsphinx ipykernel optuna lightgbm scipy ucimlrepo
pip install ../dist/*.whl
- name: Build Python Documentation
run: |
cd package-python
source .venv/bin/activate
cd docs
sphinx-build -b html source build/html
- name: Move R Documentation
run: |
mkdir -p package-python/docs/build/html/r
cp -r package-r/docs/* package-python/docs/build/html/r/
shell: bash
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: package-python/docs/build/html