-
Notifications
You must be signed in to change notification settings - Fork 17
70 lines (67 loc) · 2 KB
/
update_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
name: Run checks in main and release
on:
push:
branches:
- '*release*'
jobs:
bump_versions_and_update_schemas:
runs-on: ubuntu-latest
env:
OUTPUT_DIR: 'schemas'
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.SERVICE_TOKEN }}
- name: Set up Python 3.8
uses: actions/setup-python@v3
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install -e .[dev] --no-cache-dir
- name: Bump schema versions
run: |
python -m aind_data_schema.utils.schema_version_bump
echo "Finished schema version bump"
- name: Update schemas
run: |
rm -rf $OUTPUT_DIR
python -m pip install -e .
python -m aind_data_schema.utils.json_writer --output $OUTPUT_DIR
- name: Create example schemas
run: |
cd examples
for script in ./*.py; do
python "$script"
done
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
message: "bump schema version [skip actions]"
add: '["src", "schemas", "examples"]'
update_docs:
needs: bump_versions_and_update_schemas
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.SERVICE_TOKEN }}
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
sudo apt install graphviz libgraphviz-dev -y
python -m pip install -e .[dev] -e .[docs] --no-cache-dir
- name: Generate new rst files
run: |
sphinx-apidoc -o docs/source/ src
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
message: "updates diagrams [skip actions]"
add: '["*.rst"]'