-
Notifications
You must be signed in to change notification settings - Fork 321
63 lines (56 loc) · 1.77 KB
/
deploy-docs.yml
File metadata and controls
63 lines (56 loc) · 1.77 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
name: Deploy Documentation
on:
push:
branches:
- master
tags:
- 'v*' # Run on version tags
workflow_dispatch: # Allow manual triggering
jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Install Linux dependencies
run: |
sudo apt-get update \
&& sudo apt-get install -y pkg-config libsndfile1 \
libx11-dev libxrandr-dev libxinerama-dev \
libxrender-dev libxcomposite-dev libxcb-xinerama0-dev \
libxcursor-dev libfreetype6 libfreetype6-dev \
libasound2-dev
- name: Install Dependencies
env:
# Optimization settings to improve build speed
DISABLE_LTO: "1"
# Avoid NumPy build issues
NPY_BLAS_ORDER: ""
NPY_LAPACK_ORDER: ""
run: |
python -m pip install --upgrade pip
pip install build wheel
pip install -e .
pip install -r docs-requirements.txt
- name: Generate Documentation
run: |
python scripts/generate_type_stubs_and_docs.py
# Manually copy the demo directory into place:
cp -r docs/source/_static/demo docs/
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
publish_branch: docs
force_orphan: true
full_commit_message: 'docs: update documentation for ${{ github.ref_name }}'