From 166ec0078ce788a82ddd35507812cc19b2fe3ed3 Mon Sep 17 00:00:00 2001 From: ereti <43418802+ereti@users.noreply.github.com> Date: Mon, 1 Nov 2021 03:46:17 +0000 Subject: [PATCH 1/2] Update deploy.yml --- client/.github/workflows/deploy.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/client/.github/workflows/deploy.yml b/client/.github/workflows/deploy.yml index 040c8db62..1c8f765e7 100644 --- a/client/.github/workflows/deploy.yml +++ b/client/.github/workflows/deploy.yml @@ -2,17 +2,25 @@ name: deploy on: push: - branches: [master] + branches: [master, develop] workflow_dispatch: jobs: deploy: runs-on: ubuntu-latest steps: + - name: Staging selection + if: github.ref == 'refs/heads/develop' + run: echo "SCRIPT=tachi-client-deploy -s" >> $GITHUB_ENV + + - name: Live selection + if: github.ref == 'refs/heads/master' + run: echo "SCRIPT=tachi-client-deploy" >> $GITHUB_ENV + - name: Run deploy script on server - uses: appleboy/ssh-action@master + uses: appleboy/ssh-action@1a8b3784eaa665f677fa114edd5683bb6a6bfaa8 with: host: ${{ secrets.TACHI_HOST }} username: tachi key: ${{ secrets.TACHI_KEY }} - script: tachi-client-deploy + script: ${{ env.SCRIPT }} From 1be613dd0733efe34bcc823fe27854ad22f62b16 Mon Sep 17 00:00:00 2001 From: ereti <43418802+ereti@users.noreply.github.com> Date: Mon, 1 Nov 2021 03:48:45 +0000 Subject: [PATCH 2/2] Update deploy.yml --- client/.github/workflows/deploy.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/client/.github/workflows/deploy.yml b/client/.github/workflows/deploy.yml index 1c8f765e7..78d20ed56 100644 --- a/client/.github/workflows/deploy.yml +++ b/client/.github/workflows/deploy.yml @@ -9,18 +9,20 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - name: Staging selection + - name: Deploy to staging if: github.ref == 'refs/heads/develop' - run: echo "SCRIPT=tachi-client-deploy -s" >> $GITHUB_ENV - - - name: Live selection - if: github.ref == 'refs/heads/master' - run: echo "SCRIPT=tachi-client-deploy" >> $GITHUB_ENV - - - name: Run deploy script on server uses: appleboy/ssh-action@1a8b3784eaa665f677fa114edd5683bb6a6bfaa8 with: host: ${{ secrets.TACHI_HOST }} username: tachi key: ${{ secrets.TACHI_KEY }} - script: ${{ env.SCRIPT }} + script: tachi-client-deploy -s + + - name: Deploy to live + if: github.ref == 'refs/heads/master' + uses: appleboy/ssh-action@1a8b3784eaa665f677fa114edd5683bb6a6bfaa8 + with: + host: ${{ secrets.TACHI_HOST }} + username: tachi + key: ${{ secrets.TACHI_KEY }} + script: tachi-client-deploy