From d42cd9a88b5fa386842c428367c52c0f3307889e Mon Sep 17 00:00:00 2001 From: Zeynal Hajili <38220178+zhajili91@users.noreply.github.com> Date: Fri, 11 Aug 2023 18:40:24 +0200 Subject: [PATCH 1/5] first try to deploy non-prod env --- .github/nonprod.yaml | 39 +++++++++++++++++++++++++++++++++++++++ nonprod.yaml | 0 2 files changed, 39 insertions(+) create mode 100644 .github/nonprod.yaml create mode 100644 nonprod.yaml diff --git a/.github/nonprod.yaml b/.github/nonprod.yaml new file mode 100644 index 00000000..01be4b63 --- /dev/null +++ b/.github/nonprod.yaml @@ -0,0 +1,39 @@ +name: Deploy feature branches to nonproducation bucket + +on: + push: + branches: + - feature + +jobs: + build: + runs-on: ubuntu-latest + env: + BUCKET_NAME: cfst-3457-b238684f74061a455f63951c1-nonprodbucket-mxjfs9s4z36cInfo + steps: + - name: checkout source code + uses: actions/checkout@v2 + - name: configure AWS CLI + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-east-1 + - name: set up Node js + uses: actions/setup-node@v2 + with: + node-version: 14 + - name: build Web site + run: | + npm ci + npm run build + - name: deploy files to AWS bucket + run: aws s3 cp public s3://${{ env.BUCKET_NAME }}/ --recursive --acl public-read + + + + + + + + diff --git a/nonprod.yaml b/nonprod.yaml new file mode 100644 index 00000000..e69de29b From 014069a957b89e15d5c337f14dfed7e6d64ebc34 Mon Sep 17 00:00:00 2001 From: Zeynal Hajili <38220178+zhajili91@users.noreply.github.com> Date: Fri, 11 Aug 2023 18:43:10 +0200 Subject: [PATCH 2/5] first try to deploy non-prod env --- .github/{ => workflows}/nonprod.yaml | 0 nonprod.yaml | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename .github/{ => workflows}/nonprod.yaml (100%) delete mode 100644 nonprod.yaml diff --git a/.github/nonprod.yaml b/.github/workflows/nonprod.yaml similarity index 100% rename from .github/nonprod.yaml rename to .github/workflows/nonprod.yaml diff --git a/nonprod.yaml b/nonprod.yaml deleted file mode 100644 index e69de29b..00000000 From b60af49ef315b80321ebcd41e7aa5a7d521f275f Mon Sep 17 00:00:00 2001 From: Zeynal Hajili <38220178+zhajili91@users.noreply.github.com> Date: Fri, 11 Aug 2023 18:48:35 +0200 Subject: [PATCH 3/5] second try to deploy non-prod env --- .github/workflows/nonprod.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nonprod.yaml b/.github/workflows/nonprod.yaml index 01be4b63..9fba99f1 100644 --- a/.github/workflows/nonprod.yaml +++ b/.github/workflows/nonprod.yaml @@ -9,7 +9,7 @@ jobs: build: runs-on: ubuntu-latest env: - BUCKET_NAME: cfst-3457-b238684f74061a455f63951c1-nonprodbucket-mxjfs9s4z36cInfo + BUCKET_NAME: cfst-3457-b238684f74061a455f63951c13e6-prodbucket-e4nsecpnpsuv steps: - name: checkout source code uses: actions/checkout@v2 From 0bc6cbf45b565bd4135a1f74e615e50d9997ecfc Mon Sep 17 00:00:00 2001 From: Zeynal Hajili <38220178+zhajili91@users.noreply.github.com> Date: Fri, 11 Aug 2023 19:00:40 +0200 Subject: [PATCH 4/5] third try to deploy non-prod env --- .github/workflows/nonprod.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nonprod.yaml b/.github/workflows/nonprod.yaml index 9fba99f1..a613b66e 100644 --- a/.github/workflows/nonprod.yaml +++ b/.github/workflows/nonprod.yaml @@ -9,7 +9,7 @@ jobs: build: runs-on: ubuntu-latest env: - BUCKET_NAME: cfst-3457-b238684f74061a455f63951c13e6-prodbucket-e4nsecpnpsuv + BUCKET_NAME: cfst-3457-b238684f74061a455f63951c1-nonprodbucket-mxjfs9s4z36c steps: - name: checkout source code uses: actions/checkout@v2 From d92b9c23b621f2b23b50fa8ec756c863f0a953e9 Mon Sep 17 00:00:00 2001 From: Zeynal Hajili <38220178+zhajili91@users.noreply.github.com> Date: Fri, 11 Aug 2023 19:13:06 +0200 Subject: [PATCH 5/5] first try to prod env --- .github/workflows/prod.yaml | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/prod.yaml diff --git a/.github/workflows/prod.yaml b/.github/workflows/prod.yaml new file mode 100644 index 00000000..687878e1 --- /dev/null +++ b/.github/workflows/prod.yaml @@ -0,0 +1,39 @@ +name: Deploy feature branches to nonproducation bucket + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + env: + BUCKET_NAME: cfst-3457-b238684f74061a455f63951c13e6-prodbucket-e4nsecpnpsuv + steps: + - name: checkout source code + uses: actions/checkout@v2 + - name: configure AWS CLI + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-east-1 + - name: set up Node js + uses: actions/setup-node@v2 + with: + node-version: 14 + - name: build Web site + run: | + npm ci + npm run build + - name: deploy files to AWS bucket + run: aws s3 cp public s3://${{ env.BUCKET_NAME }}/ --recursive --acl public-read + + + + + + + +