forked from bytecodealliance/wasm-tools
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
50 changed files
with
3,316 additions
and
1,052 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Build playground | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
merge_group: | ||
|
||
# Cancel any in-flight jobs for the same PR/branch so there's only one active | ||
# at a time | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- uses: bytecodealliance/wasmtime/.github/actions/[email protected] | ||
- uses: cargo-bins/[email protected] | ||
- run: cargo binstall cargo-component -y | ||
- run: rustup component add rustfmt # needed for cargo-component, apparently? | ||
- run: npm ci | ||
working-directory: playground | ||
- run: npm run build | ||
working-directory: playground | ||
|
||
# also prepare to deploy GH pages on main | ||
- if: github.ref == 'refs/heads/main' | ||
uses: actions/configure-pages@v5 | ||
- if: github.ref == 'refs/heads/main' | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: "./playground/dist" | ||
|
||
deploy: | ||
name: Deploy | ||
if: github.ref == 'refs/heads/main' | ||
needs: build | ||
permissions: | ||
pages: write | ||
id-token: write | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- id: deployment | ||
uses: actions/deploy-pages@v4 |
Oops, something went wrong.