Skip to content

Release/v4.0.0 beta.13 (#82) #59

Release/v4.0.0 beta.13 (#82)

Release/v4.0.0 beta.13 (#82) #59

Workflow file for this run

name: Staging release pipeline
on:
push:
branches:
- develop
jobs:
sync_staging:
runs-on: ubuntu-latest
environment:
name: staging
url: https://ui-kit.staging.amity.co/
env:
NPM_FONT_AWESOME_TOKEN: ${{ secrets.NPM_FONT_AWESOME_TOKEN }}
STORYBOOK_API_REGION: ${{ secrets.STORYBOOK_API_REGION }}
STORYBOOK_API_KEY: ${{ secrets.STORYBOOK_API_KEY }}
STORYBOOK_USERS: ${{ secrets.STORYBOOK_USERS }}
steps:
- name: git checkout
uses: actions/checkout@v4
- name: install node
uses: actions/setup-node@v4
with:
node-version-file: .tool-versions
- uses: pnpm/action-setup@v4
with:
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "pnpm_cache_dir=$(pnpm store path | tr -d '\n')" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
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: Install dependencies
run: pnpm install
- 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.staging.amity.co
SOURCE_DIR: ./storybook-build
DEST_DIR: ''