-
Notifications
You must be signed in to change notification settings - Fork 6
39 lines (37 loc) · 1.17 KB
/
push_to_next.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Builds & pushes Storybook to AWS
on:
push:
branches:
- next
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: latest
- name: Install and build prez-lib
working-directory: ./prez-lib
run: |
npm ci
CI=false npm run build
- name: Install and build Storybook
working-directory: ./prez-components
run: |
npm ci
CI=false npm run build-storybook
- 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 S3 bucket
run: aws s3 rm s3://${{ secrets.NEXT_STORYBOOK_S3_BUCKET_NAME }} --recursive
- name: Upload Storybook to S3
working-directory: ./prez-components
run: aws s3 cp storybook-static/ s3://${{ secrets.NEXT_STORYBOOK_S3_BUCKET_NAME }} --recursive