Skip to content

Commit

Permalink
Reindent and use cache.
Browse files Browse the repository at this point in the history
  • Loading branch information
01mf02 committed Dec 21, 2024
1 parent 42cfa74 commit 0b2388e
Showing 1 changed file with 31 additions and 20 deletions.
51 changes: 31 additions & 20 deletions .github/workflows/playground.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,34 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install wasm-pack
shell: bash
run: |
VERSION="0.12.1"
DIR=wasm-pack-v${VERSION}-x86_64-unknown-linux-musl
wget https://github.com/rustwasm/wasm-pack/releases/download/v${VERSION}/${DIR}.tar.gz
tar xzf ${DIR}.tar.gz
mv ${DIR}/wasm-pack ~/.cargo/bin
- name: Compile
run: wasm-pack build --target web --no-typescript --no-pack --release
working-directory: jaq-play
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'jaq-play'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
- name: Checkout
uses: actions/checkout@v4

- uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
key: cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Install wasm-pack
shell: bash
run: |
VERSION="0.12.1"
DIR=wasm-pack-v${VERSION}-x86_64-unknown-linux-musl
wget https://github.com/rustwasm/wasm-pack/releases/download/v${VERSION}/${DIR}.tar.gz
tar xzf ${DIR}.tar.gz
mv ${DIR}/wasm-pack ~/.cargo/bin
- name: Compile
run: wasm-pack build --target web --no-typescript --no-pack --release
working-directory: jaq-play

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'jaq-play'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 0b2388e

Please sign in to comment.