-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (60 loc) · 1.81 KB
/
docs_deploy.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
54
55
56
57
58
59
60
61
62
name: docs
on:
push:
branches:
- main
paths:
- .pre-commit-config.yaml
- .github/workflows/code_checks.yml
- .github/workflows/docs_build.yml
- .github/workflows/docs_deploy.yml
- .github/workflows/integration_tests.yml
- '**.py'
- '**.ipynb'
- '**.html'
- '**.js'
- uv.lock
- pyproject.toml
- '**.rst'
- '**.md'
jobs:
deploy:
runs-on: [self-hosted, db]
steps:
- uses: actions/checkout@v4.2.2
with:
submodules: 'true'
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
# Install a specific version of uv.
version: "0.5.21"
enable-cache: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: ".python-version"
- name: Install dependencies and build docs
run: |
uv sync --group dev --group docs
source .venv/bin/activate
# pandoc README.md -f markdown -t rst -s -o docs/source/intro.rst
cd docs && rm -rf source/reference/api/_autosummary && make html
cd .. && coverage run -m pytest -m "not integration_test" && coverage xml && coverage report -m
- name: Upload coverage to Codecov
uses: Wandalen/wretry.action@v3.8.0
with:
action: codecov/codecov-action@v4.0.0
with: |
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
name: codecov-umbrella
fail_ci_if_error: true
attempt_limit: 5
attempt_delay: 30000
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: github_pages
publish_dir: docs/build/html