From c8345a1442d3d2aad5fde0f84a102ba750428c63 Mon Sep 17 00:00:00 2001 From: Lin Zhang Date: Thu, 12 Feb 2026 00:31:08 +0800 Subject: [PATCH] Add GitHub Actions workflow to deploy web app to GitHub Pages Co-Authored-By: Claude Opus 4.6 --- .github/workflows/deploy-web.yml | 49 ++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/deploy-web.yml diff --git a/.github/workflows/deploy-web.yml b/.github/workflows/deploy-web.yml new file mode 100644 index 00000000..c3fbaad8 --- /dev/null +++ b/.github/workflows/deploy-web.yml @@ -0,0 +1,49 @@ +name: Deploy Web App + +on: + push: + branches: [ main ] + workflow_dispatch: + +concurrency: + group: pages + cancel-in-progress: false + +permissions: + contents: read + pages: write + id-token: write + +jobs: + build: + name: Build Web App + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - uses: actions/setup-java@v5 + with: + distribution: temurin + java-version: 17 + + - uses: gradle/actions/setup-gradle@v5 + + - name: Build WasmJs distribution + run: ./gradlew :app:web:wasmJsBrowserDistribution + + - name: Upload Pages artifact + uses: actions/upload-pages-artifact@v3 + with: + path: app/web/build/dist/wasmJs/productionExecutable + + deploy: + name: Deploy to GitHub Pages + runs-on: ubuntu-latest + needs: build + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4