From 548a8999a815b0c36f853fe3537c26be0bb30c50 Mon Sep 17 00:00:00 2001 From: Lavanya Sharma Date: Wed, 21 Aug 2024 19:17:52 +0530 Subject: [PATCH] Create deploy.yml --- .github/workflows/deploy.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..3798c05 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,25 @@ +name: Deploy to S3 + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up AWS CLI + uses: aws-actions/configure-aws-credentials@v2 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-east-2 # Replace with your region + + - name: Sync files to S3 + run: | + aws s3 sync ./ s3://bucket-static-actions --delete