From a98e6e78707ea402cd15c76f3e88943d2d005f36 Mon Sep 17 00:00:00 2001 From: Marceau Tonelli Date: Mon, 29 Jul 2024 10:03:39 +0200 Subject: [PATCH 1/2] Updated github pages deployment workflow for wasmJS --- .github/workflows/static.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 6d8bfc4..41df1ff 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -4,7 +4,10 @@ name: Deploy NoiseCapture as a static website on: # Runs on pushes targeting the default branch push: - branches: ["main"] + branches: [ + "main", + "feature/wasmjs-github-pages" # FOR TESTING PURPOSES + ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -23,7 +26,7 @@ concurrency: env: - MAIN_BRANCH: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/appyx' }} + MAIN_BRANCH: ${{ github.ref == 'refs/heads/main' }} jobs: # Single deploy job since we're just deploying @@ -41,27 +44,25 @@ jobs: java-version: '17' - uses: gradle/wrapper-validation-action@v1 - uses: gradle/gradle-build-action@v3 - with: - cache-read-only: ${{ env.MAIN_BRANCH != 'true' }} + # with: + # cache-read-only: ${{ env.MAIN_BRANCH != 'true' }} - name: Cache uses: actions/cache@v4 with: key: noisecapturejs path: | - webApp/build - shared/build + build/js + composeApp/build/dist/wasmJs - name: Build run: > - ./gradlew - webApp:jsBrowserDistribution - --continue + ./gradlew wasmJsBrowserDistribution - name: Setup Pages uses: actions/configure-pages@v4 - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: # Upload js dist - path: 'webApp/build/dist/js/productionExecutable' + path: 'composeApp/build/dist/wasmJs/productionExecutable' - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 From 0eab4f0b3a41e1f9e94521d23cd702845372fb89 Mon Sep 17 00:00:00 2001 From: Marceau Tonelli Date: Mon, 29 Jul 2024 10:05:53 +0200 Subject: [PATCH 2/2] Disable testing on this branch since only main is allowed to deploy --- .github/workflows/static.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 41df1ff..04bd998 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -4,10 +4,7 @@ name: Deploy NoiseCapture as a static website on: # Runs on pushes targeting the default branch push: - branches: [ - "main", - "feature/wasmjs-github-pages" # FOR TESTING PURPOSES - ] + branches: [ "main" ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -44,8 +41,8 @@ jobs: java-version: '17' - uses: gradle/wrapper-validation-action@v1 - uses: gradle/gradle-build-action@v3 - # with: - # cache-read-only: ${{ env.MAIN_BRANCH != 'true' }} + with: + cache-read-only: ${{ env.MAIN_BRANCH != 'true' }} - name: Cache uses: actions/cache@v4 with: