From 387569de219edefad2e0979588ea5f7fdced1566 Mon Sep 17 00:00:00 2001 From: Matthew Brett Date: Thu, 11 Jul 2024 23:31:08 +0100 Subject: [PATCH] Avoid recycling Python book in R-book build --- .github/workflows/build.yaml | 1 - Makefile | 14 ++++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6dbffd5c..ad231ef9 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -105,7 +105,6 @@ jobs: - name: Build R book run: | - make _source-clean make r-book-jl cp website/r-README.md r-book/README.md touch r-book/.nojekyll diff --git a/Makefile b/Makefile index d85ff9eb..f12d7765 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ _landing-page: python-book: ## Build the Python version of the book python-book: ninja-config - cd $(SOURCE_DIR) && ninja python-book + cd $(SOURCE_DIR) && ninja clean && ninja python-book python-book-jl: python-book # Jupyter-lite files for book build. @@ -42,11 +42,14 @@ python-book-jl: python-book _py_notebooks \ ipynb \ python "Python (Pyodide)" - $(PYTHON) -m jupyter lite build --contents _py_notebooks --output-dir $(PYTHON_BOOK_DIR)/notebooks + $(PYTHON) -m jupyter lite build \ + --contents _py_notebooks \ + --output-dir $(PYTHON_BOOK_DIR)/notebooks + --lite-dir $(PYTHON_BOOK_DIR) r-book: ## Build the R version of the book r-book: ninja-config - cd $(SOURCE_DIR) && ninja r-book + cd $(SOURCE_DIR) && ninja clean && ninja r-book r-book-jl: r-book $(PIP_INSTALL_CMD) -r r-jl-requirements.txt @@ -57,7 +60,10 @@ r-book-jl: r-book webR \ "R (webR)" \ --url-root=$(ROOT_URL) - $(PYTHON) -m jupyter lite build --contents _r_notebooks --output-dir $(R_BOOK_DIR)/notebooks + $(PYTHON) -m jupyter lite build \ + --contents ../_r_notebooks \ + --output-dir $(R_BOOK_DIR)/notebooks \ + --lite-dir $(R_BOOK_DIR) _source-clean: cd $(SOURCE_DIR) && ninja clean