Add support for external command pipes in I/O functions (#466) #1019
This file contains hidden or 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: Publish Website | |
| on: | |
| push: | |
| branches: | |
| - main | |
| # Lets a stuck or outage-lost run be retriggered by hand | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v6 | |
| - name: Cache WASM build output | |
| id: wasm-cache | |
| uses: actions/cache@v6 | |
| with: | |
| path: tests/playground/pkg | |
| key: wasm-pkg-${{ hashFiles('src/**', 'Cargo.lock', 'Cargo.toml') }} | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: wasm32-unknown-unknown | |
| - name: Cache Cargo registry and build artifacts | |
| uses: actions/cache@v6 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| cargo- | |
| - name: Install wasm-pack | |
| if: steps.wasm-cache.outputs.cache-hit != 'true' | |
| run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
| - name: Build WASM playground | |
| if: steps.wasm-cache.outputs.cache-hit != 'true' | |
| run: make wasm-build-production | |
| - name: Cache woxi binary | |
| id: woxi-cache | |
| uses: actions/cache@v6 | |
| with: | |
| path: ~/.cargo/bin/woxi | |
| key: woxi-bin-${{ hashFiles('src/**', 'Cargo.lock', 'Cargo.toml') }} | |
| - name: Install woxi (for build_summary.wls) | |
| if: steps.woxi-cache.outputs.cache-hit != 'true' | |
| run: make install | |
| - name: Setup Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.12' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v8.3.0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '22' | |
| cache: 'npm' | |
| cache-dependency-path: jupyterlite-woxi-kernel/package-lock.json | |
| # Bundle CodeMirror locally so the deployed playground loads its editor | |
| # from tests/playground/vendor/codemirror.js instead of the esm.sh CDN. | |
| # The bundle is a generated artifact (gitignored), so it must be built | |
| # before the playground is copied into the deployment tree below. | |
| - name: Build CodeMirror playground bundle | |
| run: make playground-codemirror | |
| - name: Build JupyterLite kernel extension | |
| run: | | |
| cd jupyterlite-woxi-kernel && npm install && npx tsc | |
| uvx --python 3.12 --from jupyter-core --with jupyterlab \ | |
| jupyter labextension build . | |
| - name: Build JupyterLite | |
| run: | | |
| uvx \ | |
| --python 3.12 \ | |
| --with jupyterlite-core \ | |
| --with jupyterlab \ | |
| --with ./jupyterlite-woxi-kernel \ | |
| jupyter lite build --output-dir tests/jupyterlite | |
| cp -r tests/playground/pkg tests/jupyterlite/wasm | |
| - name: Build documentation | |
| run: | | |
| make docs/summary | |
| uvx --python 3.12 --from zensical==0.0.40 \ | |
| zensical build --clean -f tests/zensical.toml | |
| - name: Assemble deployment tree | |
| run: | | |
| cp -R tests/landing/. tests/book/ | |
| cp -R tests/playground/pkg tests/book/pkg | |
| rm -rf tests/book/playground | |
| cp -R tests/playground tests/book/playground | |
| rm -rf tests/book/jupyterlite | |
| cp -R tests/jupyterlite tests/book/jupyterlite | |
| cp tests/cli/favicon.png tests/book/favicon.png | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v5 | |
| with: | |
| path: tests/book | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url || steps.deployment-retry.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| # Pages occasionally fails with a transient | |
| # "Deployment failed, try again later." | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v5 | |
| continue-on-error: true | |
| - name: Retry deploy to GitHub Pages | |
| id: deployment-retry | |
| if: steps.deployment.outcome == 'failure' | |
| uses: actions/deploy-pages@v5 |