Bump litgitpuller v0.2.1 to fix file upload #128
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Deploy | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install nix | |
uses: cachix/install-nix-action@v29 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Install the dependencies | |
run: | | |
python -m pip install -r requirements.txt | |
- name: Cache the Pyodide build | |
uses: actions/cache@v4 | |
with: | |
path: ./pyodide | |
key: pyodide-${{ github.ref }} | |
restore-keys: pyodide-refs/heads/main | |
- name: Build Pyodide and all required packages | |
run: | | |
cd pyodide | |
PYODIDE_DOCKER_IMAGE=$(docker build . -q) \ | |
./run_docker \ | |
--non-interactive \ | |
PYODIDE_PACKAGES="aiohttp,basemap,cdsapi,cfgrib,cmcrameri,dask,earthkit,ecmwf-api-client,field-compression-benchmark,fsspec,git2,h5netcdf,ipyfilite,ipython,kerchunk,lzma,matplotlib,MetPy,netcdf4,numcodecs,numpy,pandas,pint,proplot,requests,scipy,sympy,s3fs,xarray,xeofs,zarr" \ | |
make | |
- name: Clean up the pyodide build | |
run: | | |
cd pyodide | |
rm -rf .docker_home | |
find . -name jupyter-lite.json -delete | |
find . -name jupyter_lite_config.json -delete | |
cd .. | |
mkdir -p static | |
cp -r pyodide/dist static/pyodide | |
rm -rf static/pyodide/*-tests.tar | |
rm -f static/pyodide/tsconfig.tsbuildinfo | |
- name: Build the JupyterLite site | |
run: | | |
rm -f files/README.md && cp ./README.md files/ | |
jupyter lite build --output-dir dist | |
cp ./_headers dist/ | |
cp -r data dist/ | |
cp static/favicons/favicon.ico dist/ | |
find dist/ -name favicon.ico | xargs -L1 cp -f static/favicons/favicon.ico | |
rm -rf static | |
- name: Deploy to dist branch | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_branch: dist | |
publish_dir: ./dist | |
force_orphan: true |