Skip to content

Commit ffb57af

Browse files
authored
Merge pull request #47 from DurhamARC-Training/45-update-jupyterlite-github-workflow
45 update jupyterlite GitHub workflow
2 parents 40e2716 + fa5135c commit ffb57af

3 files changed

Lines changed: 20 additions & 60 deletions

File tree

.github/workflows/cleanup.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Cleanup Deleted Branch
2+
3+
on:
4+
delete
5+
6+
permissions:
7+
contents: write
8+
9+
jobs:
10+
cleanup:
11+
uses: DurhamARC-Training/PythonCourse-jupyterlite/.github/workflows/cleanup-branch-deployment.yml@main
12+
secrets: inherit

.github/workflows/deploy.yml

Lines changed: 7 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,13 @@
1-
name: Deploy Jupyter Notebooks to GitHub Pages
1+
name: Deploy JupyterLite
22

33
on:
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-
jupyter lite build --contents content --output-dir dist
45-
46-
- name: Upload artifact
47-
uses: actions/upload-pages-artifact@v3
48-
with:
49-
path: ./dist
7+
permissions:
8+
contents: write
509

10+
jobs:
5111
deploy:
52-
needs: build
53-
if: github.ref == 'refs/heads/main'
54-
permissions:
55-
pages: write
56-
id-token: write
57-
58-
environment:
59-
name: github-pages
60-
url: ${{ steps.deployment.outputs.page_url }}
61-
62-
runs-on: ubuntu-latest
63-
steps:
64-
- name: Deploy to GitHub Pages
65-
id: deployment
66-
uses: actions/deploy-pages@v4
12+
uses: DurhamARC-Training/PythonCourse-jupyterlite/.github/workflows/deploy-jupyterlite.yml@main
13+
secrets: inherit

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
jupyterquiz>=2.9

0 commit comments

Comments
 (0)