Skip to content

Commit

Permalink
Avoid recycling Python book in R-book build
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-brett committed Jul 11, 2024
1 parent d478f29 commit 387569d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 10 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 387569d

Please sign in to comment.