From fadb4b19305fee09d7dd6a3c732a4c9dddfa02e5 Mon Sep 17 00:00:00 2001 From: Colin Maudry Date: Sat, 31 May 2025 15:30:29 +0200 Subject: [PATCH] =?UTF-8?q?Ajout=20de=20la=20possibilit=C3=A9=20de=20d?= =?UTF-8?q?=C3=A9ployer=20main=20d'un=20clic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yaml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index a535fbe..b2c1f09 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -1,14 +1,24 @@ -name: Deploy to yunohost on: + workflow_dispatch: + pull_request: + types: + - closed push: branches: - dev jobs: deploy: + # Trigger deploy workflow if + # ...I clicked on "Run workflow" in Github actions, thus deploy main to production env (main) + # or + # ...I merged a PR or pushed on the dev branch, thus deploy to the test env (dev) + if: | + (github.event_name == 'workflow_dispatch' && github.ref_name == 'main') || + ((github.event.pull_request.merged == true || github.event.push == true) && github.ref_name == 'dev') runs-on: ubuntu-latest - environment: dev + environment: ${{ github.ref_name }} steps: - - name: Checkout repository + - name: Checkout repositorypu uses: actions/checkout@v3 - name: Set up SSH key