repl: persistent Python worker — definitions run once, state persists #18
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: playground | |
| # Build the WASM playground and publish playground/web/ to GitHub Pages. | |
| # Enable once under Settings -> Pages -> Source: GitHub Actions. | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "playground/**" | |
| - "src/**" | |
| - "Cargo.toml" | |
| - ".github/workflows/playground.yml" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: true | |
| jobs: | |
| build-deploy: | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deploy.outputs.page_url }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Match the toolchain pinned by rust-toolchain.toml, with the wasm target. | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: "1.96" | |
| targets: wasm32-unknown-unknown | |
| - name: Install wasm-pack | |
| run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
| - name: Build WASM | |
| run: wasm-pack build playground --target web --out-dir web/pkg --release | |
| - uses: actions/configure-pages@v5 | |
| - uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: playground/web | |
| - id: deploy | |
| uses: actions/deploy-pages@v4 |