From ea00aab2169e5b7b710e83860feeeca68466f5b0 Mon Sep 17 00:00:00 2001 From: Maciej Procyk Date: Tue, 30 Jan 2024 13:43:44 +0100 Subject: [PATCH] add deploy web action --- .github/workflows/release.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 08643f44..b807b670 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -263,3 +263,36 @@ jobs: git config --global user.email "${{ secrets.CI_COMMIT_EMAIL }}" git commit version.properties -m "update version properties" git push origin HEAD:master + + build-web: + name: Build web release + runs-on: ubuntu-latest + needs: release + steps: + - name: Checkout to push branch + uses: actions/checkout@v2 + with: + ref: ${{ github.ref }} + fetch-depth: 0 + + - name: Set up JDK 19 + uses: actions/setup-java@v1 + with: + java-version: 19 + + - name: Build Wasm Distribution + if: job.status == 'success' + run: | + export GRADLE_USER_HOME=$(pwd)/.gradle + export WEB_CLIENT_API_HOST=${{ secrets.API_HOST }} + export REST_CLIENT_API_SCHEME=https + export WEBSOCKET_CLIENT_API_SCHEME=wss + chmod +x ./gradlew + ./gradlew web-app:wasmJsBrowserDistribution + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./web-app/build/dist/wasmJs/productionExecutable + force_orphan: true