Skip to content

Commit

Permalink
Build and deploy the playground from CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rpjohnst committed May 24, 2020
1 parent be4f276 commit f5af6c5
Show file tree
Hide file tree
Showing 6 changed files with 906 additions and 15 deletions.
41 changes: 35 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,46 @@ jobs:
build:
strategy:
matrix:
os: [windows-2019, macos-10.15, ubuntu-18.04]
os: [windows-latest, macos-latest, ubuntu-latest]
rust: [nightly]
runs-on: ${{ matrix.os }}
steps:
- uses: actions-rs/toolchain@v1
- name: Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
run: cargo build --frozen
- name: Test
run: cargo test --frozen

playground:
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true
- name: wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: |
wasm-pack build --target web playground -- --frozen
npm ci --prefix playground
npm run --prefix playground build
- name: Deploy
uses: bacongobbler/[email protected]
with:
source_dir: playground/public
container_name: $web
connection_string: ${{ secrets.ConnectionString }}
sync: true
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
target
Cargo.lock
200 changes: 200 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion playground/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
node_modules
package-lock.json
pkg
public/module
Loading

0 comments on commit f5af6c5

Please sign in to comment.