diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 3c2bc01..7017fd1 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -24,16 +24,13 @@ jobs: - name: Build run: npm run build - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v1 + - name: Deploy to S3 + uses: jakejarvis/s3-sync-action@master with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: 'us-east-2' - - - name: Sync directory to S3 - uses: aws-actions/amazon-s3-sync@v1 - with: - args: --acl public-read --delete - source-dir: build - destination: ${{ secrets.AWS_S3_BUCKET }} + args: --acl public-read --follow-symlinks --delete + env: + AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_REGION: 'us-east-1' # Set this to your bucket's region + SOURCE_DIR: 'build'