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

fix: source .venv/bin/activate before build #260

Merged
merged 1 commit into from
Mar 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ jobs:
run: poetry install --no-interaction --no-ansi --only docs
# build package
- name: Build package
run: python build.py
run: |
source .venv/bin/activate
python build.py
# publish package
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Expand Down
4 changes: 2 additions & 2 deletions docs/gen_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ def generate_documentation(source: Path, discard_refs: bool = True):
# generate reference documentation
nav_items = _generate_reference(source / "validators/__init__.py", source / "docs/reference")
# backup mkdocs config
_update_mkdocs_config(source / "mkdocs.yml", source / "mkdocs.bak.yml", nav_items)
_update_mkdocs_config(source / "mkdocs.yaml", source / "mkdocs.bak.yml", nav_items)
# build docs as subprocess
print(run(("mkdocs", "build"), capture_output=True).stderr.decode())
# restore mkdocs config
move(str(source / "mkdocs.bak.yml"), source / "mkdocs.yml")
move(str(source / "mkdocs.bak.yml"), source / "mkdocs.yaml")
# optionally discard reference folder
if discard_refs:
rmtree(source / "docs/reference")
Expand Down
File renamed without changes.