-
Notifications
You must be signed in to change notification settings - Fork 329
53 lines (42 loc) · 1.47 KB
/
docs.yml
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
name: Build and Deploy Sphinx Docs
on:
push:
branches:
- main # Trigger the workflow only on pushes to the main branch
# Add this permissions block
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12.4' # Specify the Python version
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.5.1
- name: Install project dependencies
run: poetry install -E all
- name: Install doc-specific dependencies
run: |
cd docs
poetry run pip install -r requirements.txt
- name: Build the documentation
run: |
cd docs
rm -rf _build # Remove existing build directory
poetry run make html # Use poetry run to ensure the correct environment is used
poetry run python -c "import ell; version = ell.__version__; print(version); open('_build/html/_static/ell_version.txt', 'w').write(version)"
# env:
# SPHINXOPTS: "-W" # Treat warnings as errors
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html # Path to the built documentation
cname: docs.ell.so