Merge pull request #28 from yourssu/develop #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build and deploy storybook to s3 | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: yarn install --immutable --immutable-cache --check-cache | |
- name: Build storybook | |
run: yarn build-storybook --output-dir=storybook-static | |
- name: Extract version from package.json | |
id: version | |
run: echo ::set-output name=VERSION::$(node -p "require('./package.json').version") | |
- name: Deploy to s3 | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
run: | | |
aws s3 cp \ | |
--recursive \ | |
--region ap-northeast-2 \ | |
./storybook-static \ | |
s3://yds-react-storybook/${{ steps.version.outputs.VERSION }} |