HotFix: propper introduction #113
This file contains 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
on: | |
push: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
deploy: | |
name: Build & deploy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Rust cache | |
uses: Swatinem/rust-cache@v1 | |
with: | |
working-directory: wasm | |
- name: Install node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: 'yarn' | |
cache-dependency-path: 'svelte-app/yarn.lock' | |
- name: Install wasm-pack | |
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
- name: Install node.js dependencies | |
working-directory: svelte-app | |
run: yarn install --frozen-lockfile | |
- name: Build (Rust) | |
run: wasm-pack -v build wasm --target web | |
- name: Build (Svelte) | |
working-directory: svelte-app | |
run: | | |
echo -e "${{ github.sha }}\n$(date)" > static/version.txt && \ | |
yarn build | |
- name: Deploy to GitHub pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ SECRETS.GITHUB_TOKEN }} | |
publish_dir: svelte-app/build | |
cname: lava.ewi.tudelft.nl |