From 336c4a00f7110274e365afdb0e52e7e1bb5f7739 Mon Sep 17 00:00:00 2001 From: Afsha10 Date: Tue, 30 Jan 2024 16:58:33 +0000 Subject: [PATCH] Add workflow for deploying front-end to awl as CI/CD automation --- .github/workflows/frontend-s3-deploy.yml | 36 ++++++++++++++++++++++++ .github/workflows/test.yml | 10 ------- 2 files changed, 36 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/frontend-s3-deploy.yml delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/frontend-s3-deploy.yml b/.github/workflows/frontend-s3-deploy.yml new file mode 100644 index 0000000000..90bfd6062b --- /dev/null +++ b/.github/workflows/frontend-s3-deploy.yml @@ -0,0 +1,36 @@ +name: S3Workflow + +on: + push: + branches: + - level-300 + +defaults: + run: + working-directory: ./client + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup NodeJS + uses: actions/setup-node@v2 + + - name: Install Dependencies + run: npm install + + - name: create build + run: npm run build + + - name: AWS credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{secrets.ACCESS_KEY}} + aws-secret-access-key: ${{secrets.SECRET_ACCESS_KEY}} + aws-region: eu-west-1 + + - name: Deploy static site to S3 bucket + run: aws s3 sync ./build/* s3://video-storage-app diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 6ede08cb26..0000000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,10 +0,0 @@ -name: CI - -on: [push] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3