Skip to content

Commit 044910c

Browse files
Merge pull request #102 from datajoint/fix/ci-datajoint-python-checkout
Fix CI: skip datajoint-python install in BUILD mode
2 parents a9c84c7 + d5c896c commit 044910c

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

.github/workflows/development.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,14 @@ jobs:
1212
DJBOT_GH_TOKEN: ${{secrets.djbot_gh_token}}
1313
steps:
1414
- uses: actions/checkout@v2
15+
- name: Checkout datajoint-python
16+
uses: actions/checkout@v2
17+
with:
18+
repository: datajoint/datajoint-python
19+
path: datajoint-python
1520
- name: Compile docs static artifacts
1621
run: |
17-
BOT_PAT=$DJBOT_GH_TOKEN MODE=BUILD HOST_UID=$(id -u) docker compose up --exit-code-from docs --build
22+
BOT_PAT=$DJBOT_GH_TOKEN MODE=BUILD DJ_PYTHON_PATH=./datajoint-python HOST_UID=$(id -u) docker compose up --exit-code-from docs --build
1823
- name: Commit documentation changes
1924
run: |
2025
git clone https://github.com/${GITHUB_REPOSITORY}.git \

docker-compose.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ services:
4747
- DJ_PASS=tutorial
4848
volumes:
4949
- .:/main
50-
- ../datajoint-python:/datajoint-python
50+
- ${DJ_PYTHON_PATH:-../datajoint-python}:/datajoint-python
5151
ports:
5252
- 8000:8000
5353
depends_on:
@@ -58,11 +58,14 @@ services:
5858
- -c
5959
- |
6060
set -e
61-
pip install -e /datajoint-python
62-
pip install scikit-image pooch
6361
if echo "$${MODE}" | grep -i live &>/dev/null; then
62+
# LIVE mode: install datajoint and notebook dependencies for interactive development
63+
pip install -e /datajoint-python
64+
pip install scikit-image pooch
6465
mkdocs serve --config-file ./mkdocs.yaml -a 0.0.0.0:8000
6566
elif echo "$${MODE}" | grep -i build &>/dev/null; then
67+
# BUILD mode: just build static site from pre-executed notebooks
68+
# datajoint-python source is mounted for mkdocstrings API doc generation
6669
mkdocs build --config-file ./mkdocs.yaml
6770
else
6871
echo "Unexpected mode..."

0 commit comments

Comments
 (0)