Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM datajoint/miniconda3:4.10.3-py3.9-alpine
WORKDIR /main
COPY --chown=anaconda:anaconda ./.docker/pip_requirements.txt ${PIP_REQUIREMENTS}
RUN /entrypoint.sh echo "Dependencies installed"
COPY --chown=anaconda:anaconda ./mkdocs.yaml /main/mkdocs.yaml
COPY --chown=anaconda:anaconda ./src /main/src
3 changes: 3 additions & 0 deletions .docker/pip_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mkdocs-material
mkdocs-redirects
mdx_truly_sane_lists
30 changes: 25 additions & 5 deletions .github/workflows/development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,32 @@ on:
branches:
- main
jobs:
deploy:
deploy-docs:
runs-on: ubuntu-latest
env:
DOCKER_CLIENT_TIMEOUT: "120"
COMPOSE_HTTP_TIMEOUT: "120"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Compile docs static artifacts
run: |
MODE=BUILD HOST_UID=$(id -u) docker-compose up --exit-code-from docs --build
- name: Commit documentation changes
run: |
git clone https://github.com/${GITHUB_REPOSITORY}.git \
--branch gh-pages --single-branch gh-pages
rm -R gh-pages/*
cp -r site/* gh-pages/
cd gh-pages
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add . --all
git commit -m "Update documentation" -a || true
# The above command will fail if no changes were present, so we ignore
# the return code.
- name: Push changes
uses: ad-m/github-push-action@master
with:
python-version: 3.x
- run: pip install mkdocs-material
- run: mkdocs gh-deploy --force
branch: gh-pages
directory: gh-pages
github_token: ${{secrets.GITHUB_TOKEN}}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
site
8 changes: 0 additions & 8 deletions .gitmodules

This file was deleted.

16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
# documentation
# DataJoint Documentation

This is the home for all DataJoint's open-source and commercial documentation.

## Test Locally

To run locally, ensure you have `Docker` and `Docker Compose` installed.

Then run the following:

`MODE="LIVE" HOST_UID=$(id -u) docker compose up --build`

Navigate to `http://localhost/` to preview the changes.

This setup supports live-reloading so all that is needed is to save the markdown files and/or `mkdocs.yaml` file to trigger a reload.
21 changes: 0 additions & 21 deletions docker-compose-mkdocs-serve.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions docker-compose-multirepo-build.yaml

This file was deleted.

30 changes: 30 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# MODE="LIVE|BUILD" HOST_UID=$(id -u) docker compose up --build
#
# Navigate to http://localhost/
version: "2.4"
services:
docs:
build:
dockerfile: .docker/Dockerfile
context: .
image: datajoint/documentation
environment:
- MODE
volumes:
- .:/main
user: ${HOST_UID}:anaconda
ports:
- 80:80
command:
- sh
- -c
- |
set -e
if echo "$${MODE}" | grep -i live &>/dev/null; then
mkdocs serve --config-file ./mkdocs.yaml -a 0.0.0.0:80
elif echo "$${MODE}" | grep -i build &>/dev/null; then
mkdocs build --config-file ./mkdocs.yaml
else
echo "Unexpected mode..."
exit 1
fi
5 changes: 0 additions & 5 deletions docs.build.dockerfile

This file was deleted.

5 changes: 0 additions & 5 deletions docs.dockerfile

This file was deleted.

Binary file removed docs/assets/elements-logo.png
Binary file not shown.
1 change: 0 additions & 1 deletion docs/element-array-ephys
Submodule element-array-ephys deleted from 97b462
56 changes: 0 additions & 56 deletions docs/index.md

This file was deleted.

36 changes: 0 additions & 36 deletions docs/stylesheets/extra.css

This file was deleted.

44 changes: 0 additions & 44 deletions docs/stylesheets/styles.css

This file was deleted.

16 changes: 0 additions & 16 deletions docs/sub_docs.html

This file was deleted.

Loading