fix: add component-scoped size aliases and document prop const convention #2416
Workflow file for this run
This file contains hidden or 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: Build Storybook PR | |
| on: | |
| pull_request: | |
| jobs: | |
| build-storybook: | |
| name: Build Storybook PR | |
| permissions: | |
| pull-requests: write | |
| contents: read | |
| id-token: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout and setup environment | |
| uses: MetaMask/action-checkout-and-setup@v1 | |
| with: | |
| is-high-risk-environment: false | |
| skip-allow-scripts: true | |
| - name: Build required packages | |
| run: yarn build | |
| - name: Build React Storybook | |
| working-directory: apps/storybook-react | |
| run: yarn build-storybook | |
| - name: Build React Native web Storybook | |
| working-directory: apps/storybook-react-native | |
| env: | |
| NODE_ENV: production | |
| run: yarn build-storybook --output-dir rn-storybook-static | |
| - name: Nest React Native Storybook under /react-native | |
| run: | | |
| mkdir -p apps/storybook-react/storybook-static/react-native | |
| cp -r apps/storybook-react-native/rn-storybook-static/. apps/storybook-react/storybook-static/react-native/ | |
| - name: Upload 'storybook-build' to S3 | |
| if: ${{ vars.AWS_REGION && vars.AWS_IAM_ROLE && vars.AWS_S3_BUCKET }} | |
| uses: metamask/github-tools/.github/actions/upload-s3@1233659b3850eb84824d7375e2e0c58eb237701d | |
| with: | |
| aws-region: ${{ vars.AWS_REGION }} | |
| role-to-assume: ${{ vars.AWS_IAM_ROLE }} | |
| s3-bucket: ${{ vars.AWS_S3_BUCKET }}/${{ github.event.repository.name }}/${{ github.run_id }}/storybook-build | |
| path: apps/storybook-react/storybook-static | |
| - name: Post Preview Comment | |
| if: ${{ vars.AWS_CLOUDFRONT_URL }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| HOST_URL: ${{ vars.AWS_CLOUDFRONT_URL }}/${{ github.event.repository.name }}/${{ github.run_id }} | |
| run: | | |
| gh pr comment "${PR_NUMBER}" --body "### 📖 Storybook Preview | |
| - [View PR Storybook](${HOST_URL}/storybook-build/index.html)" |