Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix docs syntax highlight #326

Merged
merged 7 commits into from Aug 17, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/publish.yml
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
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
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
@@ -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
@@ -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