Skip to content

Commit 447df29

Browse files
committed
fix: source .venv/bin/active before build
- rename `mkdocs.yml` to `mkdocs.yaml` - same reflects in `docs/gen_docs.py` - activates virtual environment before build **Related items** *Issues* - Closes python-validators#253 - Closes python-validators#259
1 parent 9ae6e8e commit 447df29

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ jobs:
3535
run: poetry install --no-interaction --no-ansi --only docs
3636
# build package
3737
- name: Build package
38-
run: python build.py
38+
run: |
39+
source .venv/bin/activate
40+
python build.py
3941
# publish package
4042
- name: Publish to PyPI
4143
uses: pypa/gh-action-pypi-publish@release/v1

docs/gen_docs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ def generate_documentation(source: Path, discard_refs: bool = True):
6161
# generate reference documentation
6262
nav_items = _generate_reference(source / "validators/__init__.py", source / "docs/reference")
6363
# backup mkdocs config
64-
_update_mkdocs_config(source / "mkdocs.yml", source / "mkdocs.bak.yml", nav_items)
64+
_update_mkdocs_config(source / "mkdocs.yaml", source / "mkdocs.bak.yml", nav_items)
6565
# build docs as subprocess
6666
print(run(("mkdocs", "build"), capture_output=True).stderr.decode())
6767
# restore mkdocs config
68-
move(str(source / "mkdocs.bak.yml"), source / "mkdocs.yml")
68+
move(str(source / "mkdocs.bak.yml"), source / "mkdocs.yaml")
6969
# optionally discard reference folder
7070
if discard_refs:
7171
rmtree(source / "docs/reference")

mkdocs.yml renamed to mkdocs.yaml

File renamed without changes.

0 commit comments

Comments
 (0)