From 7f65d5a4c45dad8b6891566deecacc5bf4422df7 Mon Sep 17 00:00:00 2001 From: Martin Schobben Date: Wed, 17 Jul 2024 16:36:33 +0200 Subject: [PATCH] get data --- .github/workflows/publish.yaml | 16 +++++++--------- Makefile | 3 ++- _quarto.yml | 4 +++- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 4cada13..10cf5b1 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -17,22 +17,20 @@ jobs: - name: Set up Quarto uses: quarto-dev/quarto-actions/setup@v2 - - name: Install Python and Dependencies - id: setup-python - run: make kernel - - - uses: actions/cache@v3 - with: - path: ~/.local/share/jupyter/kernels - key: ${{ runner.os }}-python-${{ steps.setup-python.outputs.python-version }}-jupyter-${{ hashFiles('chapters/*.yml') }} - - name: Render and Publish + id: setup-python uses: quarto-dev/quarto-actions/publish@v2 with: target: gh-pages env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Cache Jupyter Kernels + uses: actions/cache@v3 + with: + path: ~/.local/share/jupyter/kernels + key: ${{ runner.os }}-python-${{ steps.setup-python.outputs.python-version }}-jupyter-${{ hashFiles('chapters/*.yml') }} + - name: cache binder build on mybinder.org uses: jupyterhub/repo2docker-action@master with: diff --git a/Makefile b/Makefile index f96320a..d3f659c 100644 --- a/Makefile +++ b/Makefile @@ -20,12 +20,13 @@ clean: for i in $(REQ); do conda remove -n $$i --all -y ; jupyter kernelspec uninstall -y $$i ; done $(CONDA_ENV_DIR): - for i in $(YML); do conda env create -f $$i ; $(CONDA_ACTIVATE) $$i ; pip install --upgrade pip setuptools wheel ; done + for i in $(YML); do conda env create -f $$i; done environment: $(CONDA_ENV_DIR) @echo -e "conda environments are ready." $(KERNEL_DIR): $(CONDA_ENV_DIR) + pip install --upgrade pip pip install jupyter for i in $(REQ); do $(CONDA_ACTIVATE) $$i ; python -m ipykernel install --user --name $$i --display-name $$i ; conda deactivate; done diff --git a/_quarto.yml b/_quarto.yml index 1eb43b7..5fc1a3d 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -1,6 +1,8 @@ project: type: book - pre-render: make kernel + pre-render: + - make kernel + - make data post-render: make post-render book: