Repository navigation
117 lines (100 loc) · 2.82 KB
/
Copy pathdocs.yml
File metadata and controls
117 lines (100 loc) · 2.82 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: Documentation
on:
push:
branches: ["main"]
paths:
- "neural_lam/**"
- "docs/**"
- "README.md"
- "tests/test_marimo_notebook.py"
- "tests/datastore_examples/**"
- "pyproject.toml"
- "uv.lock"
- ".github/workflows/docs.yml"
pull_request:
branches: ["main"]
paths:
- "neural_lam/**"
- "docs/**"
- "README.md"
- "tests/test_marimo_notebook.py"
- "tests/datastore_examples/**"
- "pyproject.toml"
- "uv.lock"
- ".github/workflows/docs.yml"
workflow_dispatch:
concurrency:
group: "docs-${{ github.ref }}"
cancel-in-progress: true
permissions:
contents: read
pages: write
id-token: write
jobs:
build-docs:
name: Build docs
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Set up uv
uses: astral-sh/setup-uv@v7
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install docs dependencies
run: |
uv sync --extra cpu --extra docs --group dev --locked
echo "$PWD/.venv/bin" >> $GITHUB_PATH
- name: Export marimo notebooks (executes the tutorials, ~4 min on CPU)
run: python docs/export_notebooks.py
- name: Test notebook execution and edit links
run: pytest -q tests/test_marimo_notebook.py
- name: Build docs with sphinx
run: sphinx-build -W --keep-going -b html docs/ docs/_build/html/
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/_build/html/
deploy:
name: Deploy docs
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: build-docs
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5
linkcheck:
name: Link check
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Set up uv
uses: astral-sh/setup-uv@v7
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install docs dependencies
run: |
uv sync --extra cpu --extra docs --group dev --locked
echo "$PWD/.venv/bin" >> $GITHUB_PATH
- name: Export marimo notebooks
run: python docs/export_notebooks.py --no-execute
- name: Run linkcheck
run: sphinx-build -W --keep-going -b linkcheck docs/ docs/_build/linkcheck/