squash
This commit is contained in:
parent
4e5442af7f
commit
f1e8d88add
3 changed files with 3 additions and 75 deletions
70
.github/workflows/ci.yml
vendored
70
.github/workflows/ci.yml
vendored
|
@ -1,70 +0,0 @@
|
||||||
name: ci
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ main ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ main ]
|
|
||||||
|
|
||||||
env:
|
|
||||||
CARGO_TERM_COLOR: always
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
|
|
||||||
- name: lint
|
|
||||||
run: cargo fmt -- --check
|
|
||||||
|
|
||||||
- name: install wasm-pack
|
|
||||||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
|
||||||
|
|
||||||
- run: cargo check
|
|
||||||
|
|
||||||
- run: cargo test
|
|
||||||
|
|
||||||
- run: wasm-pack test --headless --firefox
|
|
||||||
|
|
||||||
- run: wasm-pack test --headless --chrome
|
|
||||||
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: test
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
|
|
||||||
- name: install wasm-pack
|
|
||||||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
|
||||||
|
|
||||||
- name: build
|
|
||||||
run: |
|
|
||||||
wasm-pack build
|
|
||||||
cd www
|
|
||||||
npm install
|
|
||||||
npm run build
|
|
||||||
|
|
||||||
- name: deploy
|
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
|
||||||
if: github.ref == 'refs/heads/main'
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
publish_dir: www/dist
|
|
||||||
cname: gpx.thermokar.st
|
|
|
@ -1,7 +1,5 @@
|
||||||
# gpx-web-utils
|
# gpx-web-utils
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## quickstart
|
## quickstart
|
||||||
|
|
||||||
1. install [wasm-pack](https://rustwasm.github.io/wasm-pack/installer/)
|
1. install [wasm-pack](https://rustwasm.github.io/wasm-pack/installer/)
|
||||||
|
|
|
@ -40,9 +40,9 @@ impl Component for Model {
|
||||||
|
|
||||||
fn view(&self) -> Html {
|
fn view(&self) -> Html {
|
||||||
html! {
|
html! {
|
||||||
<div>
|
<>
|
||||||
<h1>
|
<h1>
|
||||||
<a href="https://gpx.thermokar.st">{"gpx.thermokar.st"}</a>
|
<a href="/">{"gpx.thermokar.st"}</a>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
@ -68,7 +68,7 @@ impl Component for Model {
|
||||||
</a>
|
</a>
|
||||||
</small>
|
</small>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue