Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #5

Merged
merged 17 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[build]
rustflags = [ "--cfg=web_sys_unstable_apis" ]
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
RUST_LOG="info"
# RUST_LOG="info"
# RUST_BACKTRACE=1
41 changes: 41 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: deploy

on:
push:
branches: [main]

env:
CARGO_TERM_COLOR: always

jobs:
demo:
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- run: cargo build --release --package violet-demo --target wasm32-unknown-unknown
- run: mv ./target/wasm32-unknown-unknown/release/violet_demo.wasm ./violet-demo/public
- name: Upload Artefact
uses: actions/upload-artifact@v2
with:
name: demo
path: demo/public
deploy:
runs-on: ubuntu-latest
needs: [asteroids, guide]
if: github.event_name == 'push' && ${{ github.ref == 'refs/heads/main' }}
steps:
- name: Download demo
uses: actions/download-artifact@v2
with:
name: demo
path: dist/demo

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
8 changes: 8 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions-rs/toolchain@v1
with:
profile: minimal
Expand All @@ -22,6 +24,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Install nightly
uses: actions-rs/toolchain@v1
with:
Expand All @@ -40,6 +44,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Install nightly
uses: actions-rs/toolchain@v1
with:
Expand All @@ -61,6 +67,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions-rs/toolchain@v1
with:
profile: minimal
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "flax"]
path = flax
url = https://github.com/ten3roberts/flax
Loading
Loading