Add nox env to build docs

This commit is contained in:
Pedro Algarvio 2019-04-02 17:16:49 +01:00
parent e1b3f1d9ad
commit a27ed35dee
No known key found for this signature in database
GPG key ID: BB36BF6584A298FF

View file

@ -642,3 +642,16 @@ def lint_tests(session):
else:
paths = ['tests/']
_lint(session, '.testing.pylintrc', flags, paths)
@nox.session(python='2.7')
def docs(session):
'''
Build Salt's Documentation
'''
session.install('-r', 'requirements/static/py2.7/docs.txt')
os.chdir('doc/')
session.run('make', 'clean', external=True)
session.run('make', 'html', external=True)
session.run('tar', '-czvf', 'doc-archive.tar.gz', '_build/html')
os.chdir('..')