Skip to content

Commit b8969dd

Browse files
committed
update deploy yml
1 parent fb74d69 commit b8969dd

File tree

1 file changed

+4
-61
lines changed

1 file changed

+4
-61
lines changed

.github/workflows/deploy.yml

Lines changed: 4 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,10 @@
1-
name: Deploy Jupyter Notebooks to GitHub Pages
1+
name: Deploy JupyterLite
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: ['**']
66

7-
env:
8-
TEMPLATE_REPO: 'DurhamARC-Training/PythonCourse-jupyterlite'
97
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
51-
528
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
9+
uses: DurhamARC-Training/PythonCourse-jupyterlite/.github/workflows/deploy-jupyterlite.yml@github-action-branches
10+
secrets: inherit

0 commit comments

Comments
 (0)