Skip to content

Update dependencies #13

Update dependencies

Update dependencies #13

Workflow file for this run

name: Deploy web frontend
on:
push:
branches: [ main ]
pull_request:
env:
CARGO_TERM_COLOR: always
BUILD_MODE: production
jobs:
deploy:
name: Deploy
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rust-src
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '17'
- name: Cache dependencies and build directory
uses: actions/cache@v2
with:
path: |
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
target/
key: web
- name: Build
working-directory: frontend/web
run: |
# Ugly hack to work around wasm-pack not supporting custom profiles
sed -i 's/debug = true//' ../../Cargo.toml
sed -i 's/\[profile\.ci\]//' ../../Cargo.toml
sed -i 's/inherits = "release"//' ../../Cargo.toml
npm install
npm run build
rm dist/pkg/.gitignore
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: frontend/web/dist
force_orphan: true
publish_branch: web-deploy