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 1/2] 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 From d0934a965d9cf53e7205ef10a2d06db642e98bd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20Burak=20Akg=C3=BCn?= Date: Sat, 16 Nov 2024 21:56:12 +0100 Subject: [PATCH 2/2] Remove pull_request_target trigger from auto-merge workflow configuration --- .github/workflows/dependabot-auto-merge.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml index 0783225..43f715e 100644 --- a/.github/workflows/dependabot-auto-merge.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -3,9 +3,6 @@ on: pull_request: branches: - master - pull_request_target: - branches: - - master jobs: auto-merge: