-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (48 loc) · 1.55 KB
/
1-publish_storybook.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
40
41
42
43
44
45
46
47
48
49
50
name: Publish Storybook
on:
push:
paths:
- 'packages/**'
branches:
- main
workflow_dispatch:
jobs:
publish-storybook:
name: Publish Storybook
runs-on: ubuntu-latest
env:
working-directory: ./packages/sdk-react
S3_BUCKET: ${{ secrets.S3_BUCKET }}
S3_KEY: ${{ secrets.S3_KEY }}
INTERNAL_DOCS_URL: ${{ secrets.INTERNAL_DOCS_URL }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.CITYMAPPER_DOCS_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.CITYMAPPER_DOCS_AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-1
role-to-assume: ${{ secrets.CITYMAPPER_DOCS_AWS_ROLE_TO_ASSUME }}
role-external-id: ${{ secrets.CITYMAPPER_DOCS_AWS_ROLE_EXTERNAL_ID }}
role-duration-seconds: 900
# Storybook build requires node
- name: Setup Node 16
uses: actions/setup-node@v3
with:
node-version: '16'
# AWS CLI requires Python
- name: Setup Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install AWS CLI
run: pip install awscli
- name: Install Node Packages
run: yarn install --frozen-lockfile
- name: Build and upload docs to citymapper-docs bucket
run: ./scripts/publish-storybook.sh
working-directory: ${{env.working-directory}}