Use virtualenv in docs generation/builds

This commit is contained in:
Tim Wojtulewicz 2025-08-07 21:38:36 -07:00
parent 54d67c3322
commit ef055ddb7c

View file

@ -66,16 +66,14 @@ jobs:
make \ make \
python3 \ python3 \
python3-dev \ python3-dev \
python3-pip\ python3-pip \
sqlite3 \ sqlite3 \
swig \ swig \
zlib1g-dev zlib1g-dev
# Many distros adhere to PEP 394's recommendation for `python` = python3 -m venv ci-docs-venv
# `python2` so this is a simple workaround until we drop Python 2 source ci-docs-venv/bin/activate
# support and explicitly use `python3` for all invocations. pip3 install -r doc/requirements.txt
sudo ln -sf /usr/bin/python3 /usr/local/bin/python pip3 install pre-commit
sudo pip3 install --break-system-packages -r doc/requirements.txt
sudo pip3 install --break-system-packages pre-commit
- name: ccache - name: ccache
uses: hendrikmuhs/ccache-action@v1.2 uses: hendrikmuhs/ccache-action@v1.2
@ -112,6 +110,7 @@ jobs:
- name: Generate Docs - name: Generate Docs
run: | run: |
source ci-docs-venv/bin/activate
git config --global user.name zeek-bot git config --global user.name zeek-bot
git config --global user.email info@zeek.org git config --global user.email info@zeek.org