Skip to content
This repository was archived by the owner on Aug 19, 2025. It is now read-only.
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: 5 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ jobs:
- uses: "actions/setup-python@v1"
with:
python-version: 3.7
- name: "Publish"
- name: "Install dependencies"
run: "scripts/install"
- name: "Build package & docs"
run: "scripts/build"
- name: "Publish to PyPI & deploy docs"
run: "scripts/publish"
env:
TWINE_USERNAME: __token__
Expand Down
4 changes: 3 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@ nav:
- Tests & Migrations: 'tests_and_migrations.md'

markdown_extensions:
- mkautodoc
- admonition
- codehilite
- pymdownx.highlight
- pymdownx.superfences
9 changes: 9 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,12 @@ pytest
pytest-cov
starlette
requests

# Documentation
mkdocs
mkdocs-material
mkautodoc

# Packaging
twine
wheel
13 changes: 13 additions & 0 deletions scripts/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh -e

if [ -d 'venv' ] ; then
PREFIX="venv/bin/"
else
PREFIX=""
fi

set -x

${PREFIX}python setup.py sdist bdist_wheel
${PREFIX}twine check dist/*
${PREFIX}mkdocs build
3 changes: 0 additions & 3 deletions scripts/publish
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/sh -e

VERSION_FILE="databases/__init__.py"
PYTHONPATH=.

if [ -d 'venv' ] ; then
PREFIX="venv/bin/"
Expand All @@ -23,7 +22,5 @@ fi

set -x

${PREFIX}pip install twine wheel mkdocs mkdocs-material mkautodoc
${PREFIX}python setup.py sdist bdist_wheel
${PREFIX}twine upload dist/*
${PREFIX}mkdocs gh-deploy --force