Add sandbox mode, fix macOS codesign for self-contained binaries, fix… #42
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: Deploy Interactive Demo | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: wasm32-unknown-unknown | |
| - name: Install wasm-pack | |
| run: cargo install wasm-pack | |
| - name: Build WASM package | |
| run: wasm-pack build crates/wasm --target web | |
| - name: Prepare demo site | |
| run: | | |
| mkdir -p _site/demo | |
| cp examples/interactivejs/index.html _site/demo/ | |
| cp crates/wasm/pkg/rustcfml_wasm.js _site/demo/ | |
| cp crates/wasm/pkg/rustcfml_wasm_bg.wasm _site/demo/ | |
| cp crab.svg _site/demo/ | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: _site | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |