Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
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
136 changes: 68 additions & 68 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,71 +202,71 @@ jobs:
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1

build-lite:
name: Build JupyterLite
needs: build
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Conda environment with Micromamba
uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: '1.5.5-0'
environment-name: build-env
create-args: >-
python=3.10
pip
jupyterlite-core
jupyterlite-xeus

- name: Download extension package
uses: actions/download-artifact@v4
with:
name: extension-artifacts

- name: Install the extension
shell: bash -l {0}
run: |
set -eux
cp ./jupytercad_core/dist/jupytercad*.whl ./jupytercad_lab/dist/jupytercad*.whl ./jupytercad_app/dist/jupytercad*.whl .
python -m pip install jupytercad*.whl

- name: Build the lite site
shell: bash -l {0}
working-directory: lite
run: |
set -eux
mkdir -p content && cp ../examples/*.jcad ../examples/*.STEP ../examples/*.stl ./content
jupyter lite build --contents content --output-dir dist

- name: Upload github-pages artifact
id: upload-jupyterlite-artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./lite/dist
retention-days: 30

- name: Save artifact data
uses: trungleduc/appsharingspace-pr-comment/.github/actions/save-artifact-link@v2
with:
artifact_link: 'https://github.com/${{ github.repository }}/actions/runs/${{github.run_id}}/artifacts/${{ steps.upload-jupyterlite-artifact.outputs.artifact_id }}'

deploy:
needs: [integration-tests, build-lite]
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
# build-lite:
# name: Build JupyterLite
# needs: build
# runs-on: ubuntu-latest

# steps:
# - name: Checkout
# uses: actions/checkout@v3

# - name: Install Conda environment with Micromamba
# uses: mamba-org/setup-micromamba@v1
# with:
# micromamba-version: '1.5.5-0'
# environment-name: build-env
# create-args: >-
# python=3.10
# pip
# jupyterlite-core
# jupyterlite-xeus

# - name: Download extension package
# uses: actions/download-artifact@v4
# with:
# name: extension-artifacts

# - name: Install the extension
# shell: bash -l {0}
# run: |
# set -eux
# cp ./jupytercad_core/dist/jupytercad*.whl ./jupytercad_lab/dist/jupytercad*.whl ./jupytercad_app/dist/jupytercad*.whl .
# python -m pip install jupytercad*.whl

# - name: Build the lite site
# shell: bash -l {0}
# working-directory: lite
# run: |
# set -eux
# mkdir -p content && cp ../examples/*.jcad ../examples/*.STEP ../examples/*.stl ./content
# jupyter lite build --contents content --output-dir dist

# - name: Upload github-pages artifact
# id: upload-jupyterlite-artifact
# uses: actions/upload-pages-artifact@v3
# with:
# path: ./lite/dist
# retention-days: 30

# - name: Save artifact data
# uses: trungleduc/appsharingspace-pr-comment/.github/actions/save-artifact-link@v2
# with:
# artifact_link: 'https://github.com/${{ github.repository }}/actions/runs/${{github.run_id}}/artifacts/${{ steps.upload-jupyterlite-artifact.outputs.artifact_id }}'

# deploy:
# needs: [integration-tests, build-lite]
# 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
48 changes: 43 additions & 5 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,48 @@ version: 2
build:
os: 'ubuntu-20.04'
tools:
python: 'mambaforge-4.10'
python: "3.12"
nodejs: "20"
jobs:
# Install micromamba
pre_create_environment:
# The recommended syntax in the micromamba docs is process substitution.
# RTD's default shell chokes on it, so we're doing it in multiple steps
# instead.
- curl -L micro.mamba.pm/install.sh > /tmp/micromamba-install.sh
- chmod +x /tmp/micromamba-install.sh
# For some reason, SHELL is not set. The install script requires it.
- SHELL=/bin/bash /bin/bash /tmp/micromamba-install.sh

conda:
environment: docs/environment.yml
# Override the create_environment step (undocumented feature) to create
# multiple environments.
create_environment:
# Pin micromamba
- /bin/bash --login -c "micromamba self-update --version 2.0.5"
# Create the env for building the docs
- /bin/bash --login -c "micromamba env create -n jupytercad-docs -f docs/environment-docs.yml"
# Create the isolated env for building JupyterCAD
- /bin/bash --login -c "micromamba create -n jupytercad-build -c conda-forge nodejs hatch pip python=3.13"
- /bin/bash --login -c "micromamba run -n jupytercad-build pip install 'jupyterlab==4.3' 'datamodel-code-generator>=0.23.0'"

sphinx:
configuration: docs/source/conf.py
# Override the install step to do nothing - we already created the envs
install:
- "echo 'Skipping! We already have the environments we need.'"
# Before building the docs, build JupyterCAD in its isolated environment,
# then install the wheels into the docs environment.
pre_build:
- /bin/bash --login -c "micromamba run -n jupytercad-build jlpm install"
- /bin/bash --login -c "micromamba run -n jupytercad-build jlpm build"

build:
html:
- |-
/bin/bash --login -c "cd docs && micromamba run -n jupytercad-docs \
python -m sphinx -T -b html -d _build/doctrees -D language=en . \
$READTHEDOCS_OUTPUT/html"

# conda:
# environment: docs/environment.yml

# sphinx:
# configuration: docs/source/conf.py
Loading