@@ -17,46 +17,37 @@ concurrency:
1717jobs :
1818 build-book :
1919 runs-on : ubuntu-latest
20- defaults :
21- run :
22- shell : bash -l {0}
2320 steps :
24- - uses : actions/checkout@v4
21+ - uses : actions/checkout@v4
2522
26- - uses : conda-incubator/setup-miniconda@v3
27- with :
28- environment-file : environment.yml
29- activate-environment : level-up-your-python
30- miniforge-variant : Mambaforge
31- use-mamba : true
23+ -
uses :
prefix-dev/[email protected] 24+ with :
25+ pixi-version : v0.28.2
3226
33- - name : Install the kernel
34- run : |
35- python -m ipykernel install --user --name conda-env-level-up-your-python-py
36-
37- - name : Build the book
38- run : |
39- jupyter-book build .
40-
41- - uses : actions/upload-artifact@v4
42- with :
43- name : jupyterbook
44- path : _build/html/*
27+ - name : Build the book
28+ run : pixi run book
4529
30+ - uses : actions/upload-artifact@v4
31+ with :
32+ name : jupyterbook
33+ path : _build/html/*
4634
35+
4736 build-pyodide :
4837 runs-on : ubuntu-latest
4938 steps :
50- - uses : actions/checkout@v4
39+ - uses : actions/checkout@v4
40+
41+ - uses : astral-sh/setup-uv@v6
5142
52- - name : Build the Pyodide output
53- run : |
54- pipx run nox -s pyodide
43+ - name : Build the Pyodide output
44+ run : |
45+ uvx nox -s pyodide
5546
56- - uses : actions/upload-artifact@v4
57- with :
58- name : jupyterlite
59- path : _output/*
47+ - uses : actions/upload-artifact@v4
48+ with :
49+ name : jupyterlite
50+ path : _output/*
6051
6152
6253 deploy :
@@ -65,25 +56,32 @@ jobs:
6556 url : ${{ steps.deployment.outputs.page_url }}
6657 runs-on : ubuntu-latest
6758 needs : [build-book, build-pyodide]
59+ if : github.event_name == 'push'
6860 steps :
69- - name : Setup Pages
70- uses : actions/configure-pages@v5
71-
72- - uses : actions/download-artifact@v4
73- with :
74- name : jupyterbook
75- path : public
76-
77- - uses : actions/download-artifact@v4
78- with :
79- name : jupyterlite
80- path : public/live
81-
82- - name : Upload artifact
83- uses : actions/upload-pages-artifact@v3
84- with :
85- path : public
86-
87- - name : Deploy to GitHub Pages
88- id : deployment
89- uses : actions/deploy-pages@v4
61+ - name : Setup Pages
62+ uses : actions/configure-pages@v5
63+
64+ - uses : actions/download-artifact@v4
65+ with :
66+ name : jupyterbook
67+ path : public
68+
69+ - uses : actions/download-artifact@v4
70+ with :
71+ name : jupyterlite
72+ path : public/live
73+
74+ - uses : actions/download-artifact@v4
75+ with :
76+ name : slides
77+ path : public/slides
78+
79+ - name : Upload artifact
80+ uses : actions/upload-pages-artifact@v3
81+ with :
82+ path : public
83+
84+ - name : Deploy to GitHub Pages
85+ id : deployment
86+ uses : actions/deploy-pages@v4
87+
0 commit comments