Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

Commit

Permalink
get data
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinSchobben committed Jul 17, 2024
1 parent ad22c34 commit 7f65d5a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 3 additions & 1 deletion _quarto.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
project:
type: book
pre-render: make kernel
pre-render:
- make kernel
- make data
post-render: make post-render

book:
Expand Down

0 comments on commit 7f65d5a

Please sign in to comment.