File tree Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Original file line number Diff line number Diff line change 44notebook
55* getSchema.m
66docker-compose * .y * ml
7+ ! docs /docker-compose.yaml
78.vscode
89matlab.prf
910win. *
Original file line number Diff line number Diff line change 1+ # MODE="LIVE" PACKAGE=datajoint UPSTREAM_REPO=https://github.com/datajoint/datajoint-matlab.git HOST_UID=$(id -u) docker compose -f docs/docker-compose.yaml up --build
2+ #
3+ # navigate to http://localhost/
4+ version : " 2.4"
5+ services :
6+ docs :
7+ build :
8+ dockerfile : docs/.docker/Dockerfile
9+ context : ../
10+ args :
11+ - PACKAGE
12+ image : ${PACKAGE}-docs
13+ environment :
14+ - PACKAGE
15+ - UPSTREAM_REPO
16+ - MODE
17+ volumes :
18+ - ..:/main
19+ user : ${HOST_UID}:anaconda
20+ ports :
21+ - 80:80
22+ command :
23+ - sh
24+ - -c
25+ - |
26+ set -e
27+ export PATCH_VERSION=$$(cat /main/+dj/version.m | grep 'v =' | sed 's/[^0-9]*/./g' | cut -c 2-6)
28+ if echo "$${MODE}" | grep -i live &>/dev/null; then
29+ mkdocs serve --config-file ./docs/mkdocs.yaml -a 0.0.0.0:80
30+ elif echo "$${MODE}" | grep -iE "qa|build" &>/dev/null; then
31+ git branch -D gh-pages || true
32+ git fetch $${UPSTREAM_REPO} gh-pages:gh-pages || true
33+ mike deploy --config-file ./docs/mkdocs.yaml -u $PATCH_VERSION latest
34+ mike set-default --config-file ./docs/mkdocs.yaml latest
35+ if echo "$${MODE}" | grep -i qa &>/dev/null; then
36+ mike serve --config-file ./docs/mkdocs.yaml -a 0.0.0.0:80
37+ fi
38+ else
39+ echo "Unexpected mode..."
40+ exit 1
41+ fi
You can’t perform that action at this time.
0 commit comments