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:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.ref == 'refs/heads/master'
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
steps:
|
||||
- name: Checkout project
|
||||
uses: actions/checkout@v3
|
||||
|
|
@ -19,13 +19,11 @@ jobs:
|
|||
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
|
||||
cp wasm/rust-rl_bg.wasm web/
|
||||
cp wasm/rust-rl.js web/
|
||||
- name: Publish web\ to gh-pages
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
cd web/
|
||||
cd wasm/
|
||||
git init --initial-branch=master
|
||||
git config user.name "GitHub Actions"
|
||||
git config user.email "github-actions-bot@users.noreply.github.com"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue