Skip to content

Commit

Permalink
trying to move jupyterlite github publishing into the repo (#315)
Browse files Browse the repository at this point in the history
* moving jupyterlite github publishing into the repo
  • Loading branch information
paddymul authored Oct 23, 2024
1 parent 5e9e65e commit 2e56758
Show file tree
Hide file tree
Showing 30 changed files with 4,086 additions and 83 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/deploy-ghpage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Build and Deploy

on:
push:
branches:
- main
pull_request:
branches:
- '*'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

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

- name: Install mamba
uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: '1.5.8-0'
environment-file: docs/build-environment.yml
cache-environment: true

- name: Build the JupyterLite site
shell: bash -l {0}
run: |
cd docs
jupyter lite build --contents ./example-notebooks --output-dir ./_output
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./docs/_output

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
9 changes: 9 additions & 0 deletions docs/build-environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: build-env
channels:
- conda-forge
dependencies:
- python
- pip
- jupyter_server
- jupyterlite-core >=0.4.1,<0.5.0
- jupyterlite-xeus>=2.0.0,<3
13 changes: 13 additions & 0 deletions docs/environment-local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: xeus-python-kernel
channels:
- https://repo.mamba.pm/emscripten-forge
- conda-forge
dependencies:
- python=3.11
- xeus-python
- pandas
- ipywidgets
- pip
- pip:
- requests
- ../../buckaroo/dist/buckaroo-0.7.8-py3-none-any.whl #relative path to a locally built wheel
14 changes: 14 additions & 0 deletions docs/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: xeus-python-kernel
channels:
- https://repo.mamba.pm/emscripten-forge
- conda-forge
dependencies:
- python=3.11
- xeus-python
- pandas
- ipywidgets
- pip
- pip:
- requests
- buckaroo
# - ../../buckaroo/dist/buckaroo-0.7.8-py3-none-any.whl #relative path to a locally built wheel
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.7"
"version": "3.9.20"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down
File renamed without changes.
Loading

0 comments on commit 2e56758

Please sign in to comment.