Skip to content

Commit

Permalink
fix documentation syntax highlight (#326)
Browse files Browse the repository at this point in the history
* Add `scripts/docs` and `scripts/build`

Co-authored-by: Amin Alaee <mohammadamin.alaee@gmail.com>
  • Loading branch information
woile and aminalaee committed Aug 17, 2021
1 parent cc3246a commit b9f35e5
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 5 deletions.
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

0 comments on commit b9f35e5

Please sign in to comment.