Skip to content

Commit 9503f34

Browse files
committed
Custom venv without stepping into R
1 parent 131a255 commit 9503f34

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

.github/workflows/publish-website.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,12 @@ jobs:
4141
python-version: "3.x"
4242

4343
# Install python dependencies for reticulate
44-
- name: Setup r-reticulate venv
45-
shell: Rscript {0}
44+
- name: Create Python venv
4645
run: |
47-
path_to_python <- reticulate::virtualenv_create(
48-
envname = "r-reticulate",
49-
python = Sys.which("python"),
50-
requirements = "docs/requirements.txt"
51-
)
52-
writeLines(sprintf("RETICULATE_PYTHON=%s", path_to_python),
53-
Sys.getenv("GITHUB_ENV"))
46+
python -m venv r-reticulate
47+
source r-reticulate/bin/activate
48+
pip install -r docs/requirements.txt
49+
echo "RETICULATE_PYTHON=$(pwd)/r-reticulate/bin/python" >> $GITHUB_ENV
5450
5551
- name: "Set up Quarto"
5652
uses: quarto-dev/quarto-actions/setup@v2

0 commit comments

Comments
 (0)