Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
fefc4349d5
1 changed files with 34 additions and 0 deletions
34
.github/workflows/deploy wasm to gh-pages.yml
vendored
Normal file
34
.github/workflows/deploy wasm to gh-pages.yml
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
on: push
|
||||||
|
name: Build and deploy web page with WASM version
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
steps:
|
||||||
|
- name: Checkout project
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Setup - Rust
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: nightly
|
||||||
|
target: wasm32-unknown-unknown
|
||||||
|
override: true
|
||||||
|
- name: Setup - wasm-bindgen
|
||||||
|
uses: jetli/wasm-bindgen-action@v0.2.0
|
||||||
|
- name: Build, bind WASM
|
||||||
|
run: |
|
||||||
|
cargo build --release --target wasm32-unknown-unknown
|
||||||
|
wasm-bindgen target/wasm32-unknown-unknown/release/rust-rl.wasm --out-dir wasm --no-modules --no-typescript
|
||||||
|
- name: Publish web\ to gh-pages
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
|
run: |
|
||||||
|
cd wasm/
|
||||||
|
git init --initial-branch=master
|
||||||
|
git config user.name "GitHub Actions"
|
||||||
|
git config user.email "github-actions-bot@users.noreply.github.com"
|
||||||
|
git add .
|
||||||
|
|
||||||
|
git commit -m "Deploy ${GITHUB_REPOSITORY} to ${GITHUB_REPOSITORY}:gh-pages"
|
||||||
|
git push --force "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" master:gh-pages
|
||||||
|
echo "Deploy complete"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue