From 6b0f983417133776daff07aa2eb441fa295b8188 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20Burak=20Akg=C3=BCn?= Date: Sat, 16 Nov 2024 21:52:20 +0100 Subject: [PATCH] Add GitHub Actions workflow for automatic deployment on PR merge --- .github/workflows/deploy.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..a70632c --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,30 @@ +name: Deploy to GitHub Pages + +on: + pull_request: + types: [closed] + branches: [master] + +jobs: + build-and-deploy: + if: github.event.pull_request.merged == true + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + - name: Build + run: ./gradlew :composeApp:wasmJsBrowserProductionWebpack + + - name: Deploy to GitHub Pages + uses: JamesIves/github-pages-deploy-action@v4 + with: + branch: gh-pages + folder: composeApp/build/dist/wasmJs/productionExecutable + clean: true \ No newline at end of file