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

[docs] Sphinx API hosted on GitHub Pages #832

Merged
merged 11 commits into from
Aug 11, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Force str type before adding to path
  • Loading branch information
Joseph Yu authored and j0yu committed Aug 5, 2020
commit 3d56fd60174ecf5eb9cff250438b0b0adddea98f
2 changes: 1 addition & 1 deletion .github/workflows/sphinx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

jobs:
build-py:
name: HTML Artifact - ${{ matrix.os-version }} Py${{ matrix.python-version }}
name: "HTML Artifact: Py${{matrix.python-version}} ${{matrix.os-version}}"
runs-on: ${{ matrix.os-version }}-latest
strategy:
fail-fast: false
Expand Down
12 changes: 5 additions & 7 deletions docs/entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
REQUIREMENTS = ['sphinx-argparse', 'sphinx_rtd_theme', REZ_SOURCE_DIR]
DEST_DIR = os.path.join("docs", "_build")


class CliParser(argparse.ArgumentParser):
"""Parser flags, using global variables as defaults."""
INIT_DEFAULTS = {
Expand Down Expand Up @@ -91,19 +92,13 @@ def setup_env(env=os.environ):
home_dir = os.path.expanduser("~")
user_base = site.getuserbase()

print("site.getuserbase()", user_base)
print("~", home_dir)
if os.name == "posix" and os.path.expanduser("~") == "/":
home_dir = tempfile.mkdtemp()
user_base = os.path.join(home_dir, user_base.lstrip(os.sep))
env['HOME'] = home_dir

user_bin = os.path.join(user_base, 'bin')
print("home_dir", home_dir)
print("user_base", user_base)
print("user_bin", user_bin)

env['PATH'] += os.pathsep + user_bin
env['PATH'] += str(os.pathsep + user_bin)
return env


Expand All @@ -117,6 +112,9 @@ def _cli():
os.sys.exit(subprocess.call(docker_args))
else:
docs_env = setup_env()
for key, value in sorted(docs_env.items()):
print(key, type(value), value)

build_commands = (
['pip', 'install', '--user'] + REQUIREMENTS + args.requirement,
('sphinx-build', 'docs', DEST_DIR),
Expand Down