From 13611b53f8aa8534fb541961c27696c41282bdc4 Mon Sep 17 00:00:00 2001 From: Khuzama Shahid <44345364+khuzama98@users.noreply.github.com> Date: Fri, 20 Oct 2023 18:05:18 +0500 Subject: [PATCH] update: deploy.yml --- .github/workflows/deploy.yml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4c59417fd3b..499fb72e8de 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -8,6 +8,9 @@ on: jobs: deploy: runs-on: ubuntu-latest + env: + AWS_ACCESS_KEY_ID: '${{ secrets.AWS_ACCESS_KEY_ID }}' + AWS_SECRET_ACCESS_KEY: '${{ secrets.AWS_SECRET_ACCESS_KEY }}' steps: - name: Checkout code uses: actions/checkout@v2 @@ -22,17 +25,18 @@ jobs: yarn install yarn global add node-gyp yarn run build + env: + CI: false - name: Deploy to S3 - uses: jakejarvis/s3-sync-action@master + uses: reggionick/s3-deploy@v3 with: - args: --acl public-read --follow-symlinks --delete - env: - AWS_S3_BUCKET: dex-51 - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_REGION: ${{ secrets.AWS_DEFAULT_REGION }} # or your AWS region - SOURCE_DIR: 'build' + folder: build + bucket: 'dex-51' + bucket-region: 'us-east-2' + delete-removed: true + no-cache: true + private: true # Add this step if you want to invalidate CloudFront cache after each deploy. # - name: Invalidate CloudFront Distribution @@ -40,4 +44,4 @@ jobs: # aws cloudfront create-invalidation --distribution-id https://d219h6gvglr9x6.cloudfront.net --paths "/*" # env: # AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - # AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + # AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} \ No newline at end of file