-
Notifications
You must be signed in to change notification settings - Fork 51
84 lines (78 loc) · 2.29 KB
/
build-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
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
name: Documentation
on:
push:
branches:
- main
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main
submodules: true
# v3 Docs
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Checkout v3 Code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: v3
path: .aicsimageio-v3/
- name: Generate v3 Docs
run: |
cd .aicsimageio-v3/
pip install -e .[dev]
gitchangelog
make docs
mkdir -p ../docs/_static/v3/
cp -r docs/_build/html/* ../docs/_static/v3/
- name: Cleanup v3 Resources
run: |
rm -Rf .aicsimageio-v3/
# Latest Docs
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Dependencies
run: |
pip install --upgrade pip
pip install .[dev] --no-cache-dir --force-reinstall
- name: Download Test Resources
run: |
python scripts/download_test_resources.py --debug
- name: Get Prior Benchmark Results
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: benchmark-results
path: .asv/
- name: Run Benchmarks
run: |
asv machine --machine github-ci --yes
asv run --machine github-ci
- name: Store New Benchmark Results
run: |
cd .asv
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "Benchmark results for ${{ github.sha }}"
git push
- name: Generate Latest Docs
run: |
gitchangelog
make gen-docs-full
touch docs/_build/html/.nojekyll
- name: Publish Docs
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BASE_BRANCH: main # The branch the action should deploy from.
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: docs/_build/html/ # The folder the action should deploy.