Skip to content

Merge pull request #51 from HyperQuark/human-interaction #174

Merge pull request #51 from HyperQuark/human-interaction

Merge pull request #51 from HyperQuark/human-interaction #174

Workflow file for this run

on: [push, workflow_dispatch]
name: Deploy
jobs:
deploy:
name: Build WASM & website
runs-on: ubuntu-latest
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
permissions:
contents: write
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install nightly toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install wasm-bindgen-cli
uses: baptiste0928/cargo-install@v3
with:
crate: wasm-bindgen-cli
- name: Install cargo-outdir
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-outdir
- name: Install node
uses: actions/setup-node@v6
with:
node-version: "25.x"
cache: "npm"
- name: Run npm install
uses: bahmutov/npm-install@v1
- name: Install binaryen
uses: bahmutov/npm-install@v1
with:
install-command: npm i -g binaryen@nightly
cache-key-prefix: binaryen
- name: Build
env:
VITE_HASH_HISTORY: true
run: |
chmod +x build.sh && ./build.sh -Wpz
npx vite build --base=/hyperquark/$BRANCH_NAME/
- name: Move files to tmp
run: mv ./playground/dist /tmp/hq-dist
- name: checkout gh-pages
uses: actions/checkout@v4
with:
ref: gh-pages
- name: move file to gh-pages
run: |
rm -rf ./$BRANCH_NAME
mv /tmp/hq-dist ./$BRANCH_NAME
#mv ./main/* ./
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
branch: gh-pages
push_options: "--force-with-lease"