Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Cleanup Deleted Branch

on:
delete

permissions:
contents: write

jobs:
cleanup:
uses: DurhamARC-Training/PythonCourse-jupyterlite/.github/workflows/cleanup-branch-deployment.yml@main
secrets: inherit
67 changes: 7 additions & 60 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,66 +1,13 @@
name: Deploy Jupyter Notebooks to GitHub Pages
name: Deploy JupyterLite

on:
push:
branches: [ main ]
branches: ['**'] # Deploy all branches

env:
TEMPLATE_REPO: 'DurhamARC-Training/PythonCourse-jupyterlite'
jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout template repository
uses: actions/checkout@v4
with:
repository: ${{ env.TEMPLATE_REPO }}

- name: Checkout main repository into content directory
uses: actions/checkout@v4
with:
path: content

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install template dependencies
run: |
python -m pip install -r requirements.txt

- name: Install content dependencies
run: |
if [ -f content/requirements.txt ]; then
echo "Found content/requirements.txt, installing dependencies..."
python -m pip install -r content/requirements.txt
else
echo "No content/requirements.txt found, skipping content dependencies"
fi

- name: Build the JupyterLite site
run: |
jupyter lite build --contents content --output-dir dist

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./dist
permissions:
contents: write

jobs:
deploy:
needs: build
if: github.ref == 'refs/heads/main'
permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: DurhamARC-Training/PythonCourse-jupyterlite/.github/workflows/deploy-jupyterlite.yml@main
secrets: inherit
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
jupyterquiz>=2.9