From 0cf671135bafefae81ef5a504de253cb4f6d1ece Mon Sep 17 00:00:00 2001 From: Fethi Tewelde Date: Wed, 5 Jun 2024 21:43:31 +0200 Subject: [PATCH] ci config to publish web version to github pages --- .github/workflows/deploy.yaml | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/deploy.yaml diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml new file mode 100644 index 0000000..7593fe1 --- /dev/null +++ b/.github/workflows/deploy.yaml @@ -0,0 +1,37 @@ +name: Deploy Compose Web App + +on: + push: + branches: [main, publish_to_github_pages] + +permissions: + contents: write + +jobs: + test-and-build-and-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2.3.1 + + - uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }} + + - uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '17' + + - name: Build + run: | + ./gradlew wasmJsBrowserDistribution --no-configuration-cache + + - name: Deploy + uses: JamesIves/github-pages-deploy-action@4.1.5 + with: + branch: gh-pages + folder: composeApp/build/dist/wasmJs/productionExecutable \ No newline at end of file