[B2BP-883] - VideoImage bug fix (#400) #108
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Storybook | |
on: | |
push: | |
branches: ['main'] | |
# Run only if there are at least one change matching the following paths | |
paths: | |
- '.github/workflows/deploy_storybook.yaml' | |
- 'apps/nextjs-website/**' | |
workflow_dispatch: | |
# These permissions are needed to interact with GitHub's OIDC Token endpoint. | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
build: | |
name: Build and Deploy Storybook | |
runs-on: ubuntu-latest | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab | |
- name: Setup Node | |
uses: ./.github/actions/setup-node | |
- name: Install dependencies | |
shell: bash | |
run: npm install | |
- name: Create Storybook | |
shell: bash | |
working-directory: ./apps/nextjs-website | |
run: npm run build-storybook | |
- name: Configure AWS Credentials | |
uses: ./.github/actions/configure-aws-credentials | |
with: | |
aws_region: ${{ env.AWS_REGION || 'eu-south-1' }} | |
role_to_assume: ${{ secrets.IAM_ROLE_DEPLOY_WEBSITE }} | |
- name: Deploy to S3 Bucket | |
shell: bash | |
run: aws s3 sync ./apps/nextjs-website/storybook-static s3://${{ vars.S3_BUCKET_NAME }}/storybook --delete | |
- name: Create AWS Cloudfront Invalidation | |
shell: bash | |
run: aws cloudfront create-invalidation --distribution-id ${{ vars.CLOUDFRONT_DISTRIBUTION_ID_STORYBOOK }} --paths "/*" | |