only deploy when using a version tag
This commit is contained in:
parent
94ad42e0b0
commit
599729bd4c
1 changed files with 2 additions and 4 deletions
|
|
@ -3,7 +3,7 @@ name: Build and deploy web page with WASM version
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.ref == 'refs/heads/master'
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout project
|
- name: Checkout project
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
@ -19,13 +19,11 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
cargo build --release --target wasm32-unknown-unknown
|
cargo build --release --target wasm32-unknown-unknown
|
||||||
wasm-bindgen target/wasm32-unknown-unknown/release/rust-rl.wasm --out-dir wasm --no-modules --no-typescript
|
wasm-bindgen target/wasm32-unknown-unknown/release/rust-rl.wasm --out-dir wasm --no-modules --no-typescript
|
||||||
cp wasm/rust-rl_bg.wasm web/
|
|
||||||
cp wasm/rust-rl.js web/
|
|
||||||
- name: Publish web\ to gh-pages
|
- name: Publish web\ to gh-pages
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
run: |
|
run: |
|
||||||
cd web/
|
cd wasm/
|
||||||
git init --initial-branch=master
|
git init --initial-branch=master
|
||||||
git config user.name "GitHub Actions"
|
git config user.name "GitHub Actions"
|
||||||
git config user.email "github-actions-bot@users.noreply.github.com"
|
git config user.email "github-actions-bot@users.noreply.github.com"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue