diff --git a/.github/workflows/dev_deploy.yml b/.github/workflows/dev_deploy.yml index 601a3ed..4811751 100644 --- a/.github/workflows/dev_deploy.yml +++ b/.github/workflows/dev_deploy.yml @@ -52,8 +52,8 @@ jobs: - name: 'Deploy to S3: Dev' if: github.ref == 'refs/heads/master' run: | - aws s3 sync build/ s3://${{ secrets.DEV_BUCKET_NAME }} --delete --exclude "*.html" --cache-control max-age=86400,public - aws s3 sync build/ s3://${{ secrets.DEV_BUCKET_NAME }} --delete --exclude "*" --include "*.html" --cache-control max-age=0,no-cache,no-store,must-revalidate --content-type text/html + aws s3 sync build/ s3://${{ secrets.DEV_BUCKET_NAME }}/current --delete --exclude "*.html" --cache-control max-age=86400,public + aws s3 sync build/ s3://${{ secrets.DEV_BUCKET_NAME }}/current --delete --exclude "*" --include "*.html" --cache-control max-age=0,no-cache,no-store,must-revalidate --content-type text/html - name: 'Cloudfront Production: cache invalidation' if: (startsWith(github.event.ref, 'refs/tags/v') || github.event_name == 'release') @@ -67,5 +67,6 @@ jobs: # Script to upload release files - name: 'Upload release build files for staging' if: github.event.action == 'published' - run: aws s3 sync out s3://${{ secrets.DEV_BUCKET_NAME }}/releases/${{ steps.get_version.outputs.VERSION }} --delete - + run: | + aws s3 sync build/ s3://${{ secrets.DEV_BUCKET_NAME }}/releases/${{ steps.get_version.outputs.VERSION }} --delete --exclude "*.html" --cache-control max-age=86400,public + aws s3 sync build/ s3://${{ secrets.DEV_BUCKET_NAME }}/releases/${{ steps.get_version.outputs.VERSION }} --delete --exclude "*" --include "*.html" --cache-control max-age=0,no-cache,no-store,must-revalidate --content-type text/html