Skip to content

Commit

Permalink
Automatically deploy interactive demo
Browse files Browse the repository at this point in the history
  • Loading branch information
Yendric committed Jan 28, 2024
1 parent 6b8e2ea commit 9d22314
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/deploy-interactive.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
on: [push]

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
name: Publish to Cloudflare Pages
steps:
- name: Checkout
uses: actions/checkout@v3

- uses: pnpm/action-setup@v2
with:
version: 8

- name: Build frontend
run: |
rustup target add wasm32-wasi
cargo build --target "wasm32-wasi" --lib --release
cp target/wasm32-wasi/release/predicate_logic_visualizer.wasm interactive/public/predicate_logic_visualizer.wasm
cd interactive
pnpm install
pnpm run build
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: predicate_logic_visualizer
directory: interactive/dist
gitHubToken: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 9d22314

Please sign in to comment.