added docs workflow

This commit is contained in:
Christopher Pickering 2021-09-16 10:14:45 +02:00
parent 28b9a8c8d7
commit 925ce46f12
No known key found for this signature in database
GPG key ID: E14DB3B0A0FACF84
2 changed files with 37 additions and 0 deletions

26
.github/workflows/docs.yml vendored Normal file
View file

@ -0,0 +1,26 @@
name: Docs
on:
release:
types: [published]
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: build docs
run: |
pip install tox
tox -e docs
- name: publish
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build
publish_branch: netlify

11
tox.ini
View file

@ -55,3 +55,14 @@ deps =
commands =
pytest --cov=src/djlint --cov-branch --cov-report xml:coverage.xml --cov-report term-missing
skip_install: false
[testenv:docs]
changedir = docs
deps =
sphinx
myst-parser
sphinx_copybutton
commands = sphinx-build -E -b html . _build
setenv =
PYTHONDONTWRITEBYTECODE=1
DEBUG=False