-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathbuild_and_deploy_documentation.yml
More file actions
47 lines (41 loc) · 1.26 KB
/
build_and_deploy_documentation.yml
File metadata and controls
47 lines (41 loc) · 1.26 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
name: "Build Sphinx Documentation"
on:
workflow_dispatch:
push:
branches:
- main
permissions:
contents: write
jobs:
docs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install git -y
python -m pip install torch==2.7.1
python -m pip install --upgrade pip setuptools wheel
export FLASH_ATTENTION_SKIP_CUDA_BUILD=TRUE
python -m pip install -e .
python -m pip install myst-parser
python -m pip install sphinx-rtd-theme sphinx-autodoc-typehints sphinx-click sphinx-automodapi texext
- name: "Parse into HTML"
run: |
sphinx-apidoc -o docs/source/api src/modalities
sphinx-build -M html docs/source/ docs/build/
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/html
force_orphan: true