Skip to content

Commit a13f801

Browse files
authored
Merge pull request DurhamARC-Training#69 from DurhamARC-Training/dev
Update main
2 parents 831c105 + 606ad52 commit a13f801

File tree

4 files changed

+2465
-2615
lines changed

4 files changed

+2465
-2615
lines changed

.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 & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +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-
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

Comments
 (0)