Skip to content

chore: workflow 수정 #11

chore: workflow 수정

chore: workflow 수정 #11

name: 스토리북 S3 배포 ✌️
on:
push:
branches:
- storybook/**
jobs:
build:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: ./
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
steps:
- name: Use repository source
uses: actions/checkout@v3
- name: Use node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Install dependencies
run: pnpm install
- name: Build Storybook
run: pnpm build-storybook
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Deploy to S3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ap-northeast-2
run: |
aws s3 sync \
--region ap-northeast-2 \
storybook-static s3://anotherme-storybook \
--delete