1- name : Deploy Jupyter Notebooks to GitHub Pages
1+ name : Deploy JupyterLite
22
33on :
44 push :
5- branches : [ main ]
5+ branches : ['**'] # Deploy all branches
66
7- env :
8- TEMPLATE_REPO : ' DurhamARC-Training/PythonCourse-jupyterlite'
9- jobs :
10- build :
11- runs-on : ubuntu-latest
12-
13- steps :
14- - name : Checkout template repository
15- uses : actions/checkout@v4
16- with :
17- repository : ${{ env.TEMPLATE_REPO }}
18-
19- - name : Checkout main repository into content directory
20- uses : actions/checkout@v4
21- with :
22- path : content
23-
24- - name : Setup Python
25- uses : actions/setup-python@v5
26- with :
27- python-version : ' 3.11'
28-
29- - name : Install template dependencies
30- run : |
31- python -m pip install -r requirements.txt
32-
33- - name : Install content dependencies
34- run : |
35- if [ -f content/requirements.txt ]; then
36- echo "Found content/requirements.txt, installing dependencies..."
37- python -m pip install -r content/requirements.txt
38- else
39- echo "No content/requirements.txt found, skipping content dependencies"
40- fi
41-
42- - name : Build the JupyterLite site
43- run : |
44- cp README.md content
45- jupyter lite build --contents content --output-dir dist
46-
47- - name : Upload artifact
48- uses : actions/upload-pages-artifact@v3
49- with :
50- path : ./dist
7+ permissions :
8+ contents : write
519
10+ jobs :
5211 deploy :
53- needs : build
54- if : github.ref == 'refs/heads/main'
55- permissions :
56- pages : write
57- id-token : write
58-
59- environment :
60- name : github-pages
61- url : ${{ steps.deployment.outputs.page_url }}
62-
63- runs-on : ubuntu-latest
64- steps :
65- - name : Deploy to GitHub Pages
66- id : deployment
67- uses : actions/deploy-pages@v4
12+ uses : DurhamARC-Training/PythonCourse-jupyterlite/.github/workflows/deploy-jupyterlite.yml@main
13+ secrets : inherit
0 commit comments