Skip to content

Commit ab7ba12

Browse files
Fixed workflow build
1 parent ca8dc94 commit ab7ba12

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/workflows/deploy-storybook.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,13 @@ jobs:
4242
aws-region: 'us-east-1'
4343

4444
- name: Deploy to S3 bucket
45-
run: aws s3 sync ./storybook-static/ s3://${{ secrets.AWS_S3_BUCKET }} --delete
45+
run: aws s3 sync ./storybook-static/ s3://${{ secrets.AWS_S3_BUCKET }} --delete --acl public-read
46+
47+
- name: Set proper MIME types for JS files
48+
run: |
49+
aws s3 cp s3://${{ secrets.AWS_S3_BUCKET }}/ s3://${{ secrets.AWS_S3_BUCKET }}/ --recursive --exclude "*" --include "*.js" --content-type "application/javascript" --metadata-directive REPLACE --acl public-read
50+
aws s3 cp s3://${{ secrets.AWS_S3_BUCKET }}/ s3://${{ secrets.AWS_S3_BUCKET }}/ --recursive --exclude "*" --include "*.css" --content-type "text/css" --metadata-directive REPLACE --acl public-read
51+
aws s3 cp s3://${{ secrets.AWS_S3_BUCKET }}/ s3://${{ secrets.AWS_S3_BUCKET }}/ --recursive --exclude "*" --include "*.json" --content-type "application/json" --metadata-directive REPLACE --acl public-read
4652
4753
- name: No-cache index.html
4854
run: aws s3 cp s3://${{ secrets.AWS_S3_BUCKET }}/index.html s3://${{ secrets.AWS_S3_BUCKET }}/index.html --metadata-directive REPLACE --cache-control max-age=0,no-cache,no-store,must-revalidate --content-type text/html --acl public-read
@@ -52,7 +58,9 @@ jobs:
5258
env:
5359
SLACK_ICON_EMOJI: ':books:'
5460
SLACK_USERNAME: mx-sdk-dapp-ui
55-
SLACK_MESSAGE: 'Storybook deployed to ${{ secrets.AWS_S3_BUCKET }}'
56-
SLACK_FOOTER: ''
57-
MSG_MINIMAL: true
61+
SLACK_TITLE: 'Storybook Deployment'
62+
SLACK_MESSAGE: 'Storybook successfully deployed to https://${{ secrets.AWS_S3_BUCKET }}.s3.amazonaws.com'
63+
SLACK_COLOR: 'good'
64+
SLACK_FOOTER: 'Deployed from branch: ${{ github.ref_name }}'
65+
MSG_MINIMAL: false
5866
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

0 commit comments

Comments
 (0)