From b84e6c17921f3f3ba54a78d5c1c77bce5b5e0cb2 Mon Sep 17 00:00:00 2001 From: Tiago Duarte Date: Wed, 27 Nov 2019 16:22:48 +0000 Subject: [PATCH] update CD action with checks for master & develop branch --- .github/workflows/continuous-deployment.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/continuous-deployment.yml b/.github/workflows/continuous-deployment.yml index 802ee0c..c54ef92 100644 --- a/.github/workflows/continuous-deployment.yml +++ b/.github/workflows/continuous-deployment.yml @@ -26,9 +26,18 @@ jobs: - name: Build run: yarn build - - name: Deploy + - name: Deploy staging + if: github.ref == 'refs/heads/develop' uses: jakejarvis/s3-sync-action@v0.5.0 with: args: --acl public-read --follow-symlinks --delete env: AWS_S3_BUCKET: ${{ secrets.STAGING_AWS_S3_BUCKET }} + + - name: Deploy production + if: github.ref == 'refs/heads/master' + uses: jakejarvis/s3-sync-action@v0.5.0 + with: + args: --acl public-read --follow-symlinks --delete + env: + AWS_S3_BUCKET: ${{ secrets.PRODUCTION_AWS_S3_BUCKET }}