This commit is contained in:
Matthew Ryan Dillon 2021-11-29 21:35:07 -07:00
parent 4e5442af7f
commit f1e8d88add
3 changed files with 3 additions and 75 deletions
.github/workflows
README.md
src

View file

@ -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

View file

@ -1,7 +1,5 @@
# gpx-web-utils
![ci](https://github.com/thermokarst/gpx-web-utils/workflows/ci/badge.svg)
## quickstart
1. install [wasm-pack](https://rustwasm.github.io/wasm-pack/installer/)

View file

@ -40,9 +40,9 @@ impl Component for Model {
fn view(&self) -> Html {
html! {
<div>
<>
<h1>
<a href="https://gpx.thermokar.st">{"gpx.thermokar.st"}</a>
<a href="/">{"gpx.thermokar.st"}</a>
</h1>
<p>
@ -68,7 +68,7 @@ impl Component for Model {
</a>
</small>
</p>
</div>
</>
}
}
}