From 88c8cfdf17aafd3aa39154ab3a87df45adea4461 Mon Sep 17 00:00:00 2001 From: Abdelhak Marouane Date: Thu, 18 Apr 2024 14:55:46 -0500 Subject: [PATCH 1/5] Fixing issue 110 --- .github/workflows/deploy.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6673d7ab4..bd417388d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -27,6 +27,8 @@ jobs: echo "env_name=production" >> $GITHUB_OUTPUT elif [ "${{ github.ref }}" = "refs/heads/develop" ]; then echo "env_name=staging" >> $GITHUB_OUTPUT + elif [ "${{ github.ref }}" = "refs/heads/fix-issue-110" ]; then + echo "env_name=staging" >> $GITHUB_OUTPUT fi - name: Print the environment run: echo "The environment is ${{ steps.define_environment.outputs.env_name }}" @@ -122,7 +124,7 @@ jobs: - name: Deploy to S3 Production run: | - aws s3 sync ./dist s3://${{ secrets.S3_BUCKET }} --cache-control max-age=604800 --delete + aws s3 sync ./dist s3://${{ secrets.S3_BUCKET }} --cache-control max-age=30,must-revalidate,s-maxage=604800 --delete - name: Request Invalidation to AWS Cloudfront uses: oneyedev/aws-cloudfront-invalidation@v1 From 7611c32e8da184d9010b2af9cc4a1ee13af09662 Mon Sep 17 00:00:00 2001 From: Abdelhak Marouane Date: Thu, 18 Apr 2024 15:06:55 -0500 Subject: [PATCH 2/5] Automate the fix of the issue 110 --- .github/workflows/checks.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index e0aed6713..d07365269 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -6,6 +6,7 @@ # The checks are skipped on the 'main' branch. The project relies on branch # protection to avoid pushes straight to 'main'. + name: Checks on: From 3fa656ddae206f5b10bdf88fd717bdf585fe7655 Mon Sep 17 00:00:00 2001 From: Abdelhak Marouane Date: Thu, 18 Apr 2024 15:08:28 -0500 Subject: [PATCH 3/5] Sync the build to S3 --- .github/workflows/deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index bd417388d..5c7a8b49c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -11,6 +11,7 @@ on: branches: - main - develop + - fix-issue-110 env: NODE: 16 From e9faf5d23a81e8826ab22cda5d8bbeac0374724e Mon Sep 17 00:00:00 2001 From: Abdelhak Marouane Date: Thu, 18 Apr 2024 15:20:38 -0500 Subject: [PATCH 4/5] Update the sync command to match GHG dashboard sync command --- .github/workflows/deploy.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5c7a8b49c..11d973605 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -11,7 +11,6 @@ on: branches: - main - develop - - fix-issue-110 env: NODE: 16 @@ -28,9 +27,6 @@ jobs: echo "env_name=production" >> $GITHUB_OUTPUT elif [ "${{ github.ref }}" = "refs/heads/develop" ]; then echo "env_name=staging" >> $GITHUB_OUTPUT - elif [ "${{ github.ref }}" = "refs/heads/fix-issue-110" ]; then - echo "env_name=staging" >> $GITHUB_OUTPUT - fi - name: Print the environment run: echo "The environment is ${{ steps.define_environment.outputs.env_name }}" From 07fd564ecacba4203324083d7848db537760f92f Mon Sep 17 00:00:00 2001 From: Abdelhak Marouane Date: Thu, 18 Apr 2024 15:40:18 -0500 Subject: [PATCH 5/5] Fixing a typo --- .github/workflows/deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 11d973605..8936dc8c7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -27,6 +27,7 @@ jobs: echo "env_name=production" >> $GITHUB_OUTPUT elif [ "${{ github.ref }}" = "refs/heads/develop" ]; then echo "env_name=staging" >> $GITHUB_OUTPUT + fi - name: Print the environment run: echo "The environment is ${{ steps.define_environment.outputs.env_name }}"