From c7a84ca8e5e9be5c99ee05faf7d251f471773dfc Mon Sep 17 00:00:00 2001 From: Waldo Jaquith Date: Thu, 2 Dec 2021 23:38:35 -0500 Subject: [PATCH] Support deploys to prod Toward #755. --- .github/workflows/deploy.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index be2b0346..54ecc594 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,12 +1,14 @@ -name: Deploy +name: Deploy Process on: push: branches: - master + - deploy pull_request: branches: - master + - deploy jobs: build: @@ -61,10 +63,19 @@ jobs: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }} aws-region: us-east-1 - - name: Create CodeDeploy Deployment + - name: Staging CodeDeploy Deployment + if: ${{ github.head_ref == 'master' }} run: | aws deploy create-deployment \ --application-name RS-Web \ --deployment-group-name RS-Web-Staging \ --deployment-config-name CodeDeployDefault.OneAtATime \ --github-location repository=${{ github.repository }},commitId=${{ github.sha }} + - name: Production CodeDeploy Deployment + if: ${{ github.head_ref == 'deploy' }} + run: | + aws deploy create-deployment \ + --application-name RS-Web \ + --deployment-group-name RS-Web-Fleet \ + --deployment-config-name CodeDeployDefault.OneAtATime \ + --github-location repository=${{ github.repository }},commitId=${{ github.sha }}