-
Notifications
You must be signed in to change notification settings - Fork 43
58 lines (48 loc) · 1.65 KB
/
staging.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
51
52
53
54
55
56
57
58
name: Staging release pipeline
on:
push:
branches:
- develop
jobs:
sync_staging:
runs-on: ubuntu-latest
environment:
name: staging
url: https://ui-kit-open-source.staging.amity.co/
env:
STORYBOOK_API_REGION: ${{ secrets.STORYBOOK_API_REGION }}
STORYBOOK_API_KEY: ${{ secrets.STORYBOOK_API_KEY }}
STORYBOOK_USER1: ${{ secrets.STORYBOOK_USER1 }}
STORYBOOK_USER2: ${{ secrets.STORYBOOK_USER2 }}
STORYBOOK_USER3: ${{ secrets.STORYBOOK_USER3 }}
STORYBOOK_USER4: ${{ secrets.STORYBOOK_USER4 }}
STORYBOOK_USER5: ${{ secrets.STORYBOOK_USER5 }}
STORYBOOK_USER6: ${{ secrets.STORYBOOK_USER6 }}
steps:
- name: git checkout
uses: actions/checkout@v2
- name: install node
uses: actions/setup-node@v2
- uses: pnpm/action-setup@v2
with:
version: 8
run_install: true
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: build storybook
run: pnpm run storybook:build
- name: publish on s3
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_S3_BUCKET: ui-kit-open-source.staging.amity.co
SOURCE_DIR: ./storybook-build
DEST_DIR: ''