Skip to content

Update deploy.yml

Update deploy.yml #4

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
# tags:
# pull_request:
env:
CARGO_TERM_COLOR: always
# if a test fails, shows the backtrace
RUST_BACKTRACE: 1
# if depending on a ssh crate, use the git cli.
CARGO_NET_GIT_FETCH_WITH_CLI: true
jobs:
build:
runs-on: ubuntu-latest
# permissions:
# contents: write
steps:

Check failure on line 21 in .github/workflows/deploy.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/deploy.yml

Invalid workflow file

You have an error in your yaml syntax on line 21
- uses: actions/checkout@v2
# rust compiler for creating binaries
- name: Install latest nightly (for wasm)
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: wasm32-unknown-unknown
components: rustfmt, clippy
override: true
- name: Install wasm target
run: |
set -e
rustup target add wasm32-unknown-unknown
# Runs some Rust-related caching
- uses: Swatinem/rust-cache@v2
- name: Install wasm-pack
uses: actions-rs/cargo@v1
with:
command: install
args: --target-dir ./target/wasm/ wasm-pack
- name: Build Release wasm
run: wasm-pack build --release --target web --no-default-features --features "wasm_yew_ui"
- name: Prepare Wasm deploy
run: |
set -e
# Prepare the publishing structure
mkdir -p publish/
# move assets
mv index.html publish/
mv index.js publish/
mv pkg/ publish/pkg/
# rm gitignore
rm publish/pkg/.gitignore
# Publish
- name: Frontend Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./publish
keep_files: false