Skip to content

address build errors #12

address build errors

address build errors #12

Workflow file for this run

name: Build & push Storybook & Prez UI demo site to AWS
on:
push:
branches:
- hjohns/next/widgets
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm & install workspace
uses: pnpm/action-setup@v3
with:
version: latest
run_install: true
- name: Build prez-lib
working-directory: ./prez-lib
run: CI=false pnpm build
- name: Build prez-components
working-directory: ./prez-components
run: CI=false pnpm build
- name: Build Storybook
working-directory: ./prez-components
run: CI=false pnpm build-storybook
- name: Build prez-ui
working-directory: ./prez-ui
env:
NUXT_PUBLIC_API_URL: ${{ secrets.NEXT_WIDGETS_API_URL }}
run: CI=false pnpm generate
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ap-southeast-2
- name: Clear Storybook S3 bucket
run: aws s3 rm s3://${{ secrets.NEXT_WIDGETS_STORYBOOK_S3_BUCKET_NAME }} --recursive
- name: Upload Storybook to S3
working-directory: ./prez-components
run: aws s3 cp storybook-static/ s3://${{ secrets.NEXT_WIDGETS_STORYBOOK_S3_BUCKET_NAME }} --recursive
- name: Clear Prez UI S3 bucket
run: aws s3 rm s3://${{ secrets.NEXT_WIDGETS_PREZUI_S3_BUCKET_NAME }} --recursive
- name: Upload Prez UI to S3
working-directory: ./prez-ui
run: aws s3 cp dist/ s3://${{ secrets.NEXT_WIDGETS_PREZUI_S3_BUCKET_NAME }} --recursive