diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml new file mode 100644 index 0000000..63470c7 --- /dev/null +++ b/.github/workflows/cleanup.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index fa51377..f8c2afe 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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 \ No newline at end of file + uses: DurhamARC-Training/PythonCourse-jupyterlite/.github/workflows/deploy-jupyterlite.yml@main + secrets: inherit \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..b8a1003 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +jupyterquiz>=2.9 \ No newline at end of file