-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (49 loc) · 1.39 KB
/
docs.yml
File metadata and controls
57 lines (49 loc) · 1.39 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
name: Build and Deploy Docs
on:
push:
branches: ["main"]
paths:
- "doc_source/**"
- "src/ect/**"
pull_request:
branches: ["main"]
jobs:
docs:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version-file: "pyproject.toml"
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y pandoc
- name: Create venv and install dependencies
run: |
uv venv
source .venv/bin/activate
uv pip install -e .
uv pip install sphinx sphinx-rtd-theme nbsphinx autopep8 myst-parser ipykernel pandas
- name: Install python3 Jupyter kernel
run: |
source .venv/bin/activate
python -m ipykernel install --user --name python3 --display-name "Python 3"
- name: Build documentation
run: |
source .venv/bin/activate
make html
- name: Deploy to GitHub Pages
if: github.event_name == 'push'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
force_orphan: true