From 599729bd4c1656bcc248921c08d1ddf6c1875397 Mon Sep 17 00:00:00 2001 From: Llywelwyn <82828093+Llywelwyn@users.noreply.github.com> Date: Sun, 3 Sep 2023 22:44:14 +0100 Subject: [PATCH] only deploy when using a version tag --- .github/workflows/deploy wasm to gh-pages.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy wasm to gh-pages.yml b/.github/workflows/deploy wasm to gh-pages.yml index a07efdf..1a5bb6f 100644 --- a/.github/workflows/deploy wasm to gh-pages.yml +++ b/.github/workflows/deploy wasm to gh-pages.yml @@ -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"