Skip to content

Commit

Permalink
dev(narugo): try fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
narugo1992 committed Dec 8, 2023
1 parent 7d6dd58 commit be30a01
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ jobs:
env:
ENV_PROD: 'true'
PLANTUML_HOST: http://localhost:18080
DOCS_CLEAN_BUILD: 'true'
run: |
git fetch --all --tags
git branch -av
Expand Down
14 changes: 11 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,24 @@

# Build dependencies if needed
if not os.environ.get("NO_CONTENTS_BUILD"):
_DOCS_BUILD_PATH = os.path.abspath(os.path.join(_DOC_PATH, '..', 'build'))
_env = dict(os.environ)
_env.update(
dict(
SOURCEDIR=_DOC_PATH,
BUILDDIR=os.path.abspath(os.path.join(_DOC_PATH, '..', 'build')),
BUILDDIR=_DOCS_BUILD_PATH,
PYTHONPATH=':'.join([_PROJ_PATH, _LIBS_PATH]),
PATH=':'.join([_SHIMS_PATH, os.environ.get('PATH', '')]),
)
)

if os.environ.get('DOCS_CLEAN_BUILD'):
make_build_cmd = (where.first('make'), 'clean')
print("Try cleaning extensions {cmd}...".format(cmd=repr(make_build_cmd)))
make_build = Popen(make_build_cmd, stdout=sys.stdout, stderr=sys.stderr, env=_env, cwd=_PROJ_PATH)
if make_build.wait() != 0:
raise ChildProcessError("Extension clean failed with %d." % (make_build.returncode,))

if os.path.exists(os.path.join(_PROJ_PATH, 'requirements-build.txt')):
pip_build_cmd = (where.first('pip'), 'install', '-r', os.path.join(_PROJ_PATH, 'requirements-build.txt'))
print("Install pip requirements {cmd}...".format(cmd=repr(pip_build_cmd)))
Expand All @@ -62,13 +70,13 @@
if make_build.wait() != 0:
raise ChildProcessError("Extension build failed with %d." % (make_build.returncode,))

pip_cmd = (where.first('pip'), 'install', '-r', os.path.join(_PROJ_PATH, 'requirements.txt'))
pip_cmd = (where.first('pip'), 'install', '-U', '-r', os.path.join(_PROJ_PATH, 'requirements.txt'))
print("Install pip requirements {cmd}...".format(cmd=repr(pip_cmd)))
pip = Popen(pip_cmd, stdout=sys.stdout, stderr=sys.stderr, env=_env, cwd=_DOC_PATH)
if pip.wait() != 0:
raise ChildProcessError("Pip install failed with %d." % (pip.returncode,))

pip_docs_cmd = (where.first('pip'), 'install', '-r', os.path.join(_PROJ_PATH, 'requirements-doc.txt'))
pip_docs_cmd = (where.first('pip'), 'install', '-U', '-r', os.path.join(_PROJ_PATH, 'requirements-doc.txt'))
print("Install pip docs requirements {cmd}...".format(cmd=repr(pip_docs_cmd)))
pip_docs = Popen(pip_docs_cmd, stdout=sys.stdout, stderr=sys.stderr, env=_env, cwd=_DOC_PATH)
if pip_docs.wait() != 0:
Expand Down

0 comments on commit be30a01

Please sign in to comment.