diff --git a/.github/workflows/publish-demo.yaml b/.github/workflows/publish-demo.yaml new file mode 100644 index 00000000..7226e918 --- /dev/null +++ b/.github/workflows/publish-demo.yaml @@ -0,0 +1,47 @@ +name: Publish wasmJs demo + +on: + push: + branches: [ main ] + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +jobs: + deploy_docs: + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - uses: actions/checkout@v4 + with: + lfs: 'true' + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + cache: gradle + + - uses: gradle/gradle-build-action@v3.3.2 + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Build + run: ./gradlew :composeApp:wasmJsBrowserDistribution -DXmx8G + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: 'composeApp/build/dist/wasmJs/productionExecutable' + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4