Merge pull request #36 from viplatform/fix-workflows #54
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: UAT-Storybook | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| name: Build | |
| runs-on: ubuntu-latest | |
| env: | |
| CONFIG_TYPE: "UAT" | |
| ASSET_BASE_URL: "https://assets.viplatform.net/mui-drawer" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Nodejs, Install Dependencies, and Build Storybook | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20.19.0" | |
| - run: yarn install | |
| - run: yarn build-storybook | |
| - name: Install-aws-cli | |
| uses: unfor19/install-aws-cli-action@v1 | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v2 | |
| with: | |
| aws-access-key-id: ${{ secrets.UAT_AWS_ACCESS_KEY }} | |
| aws-secret-access-key: ${{ secrets.UAT_AWS_SECRET_ACCESS_KEY }} | |
| aws-region: ap-southeast-1 | |
| - name: Upload files to S3 with AWS CLI | |
| run: | | |
| aws s3 sync ./storybook-static s3://storybook.uat.viplatform.net/mui-drawer --delete |