Skip to content

Bug/#168 - ์Šคํ† ๋ฆฌ๋ถ ๋นŒ๋“œ๋˜์ง€ ์•Š๋Š” ๋ฌธ์ œ ์ˆ˜์ • #7

Bug/#168 - ์Šคํ† ๋ฆฌ๋ถ ๋นŒ๋“œ๋˜์ง€ ์•Š๋Š” ๋ฌธ์ œ ์ˆ˜์ •

Bug/#168 - ์Šคํ† ๋ฆฌ๋ถ ๋นŒ๋“œ๋˜์ง€ ์•Š๋Š” ๋ฌธ์ œ ์ˆ˜์ • #7

Workflow file for this run

name: storybook deploy
on:
push:
branches: ['dev-fe']
pull_request:
branches: ['dev-fe']
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
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
- name: Cache node_modules
id: cache
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: yarn install
if: steps.cache.outputs.cache-hit != 'true'
- name: Set PUBLIC_URL
run: |
PUBLIC_URL=$(echo $GITHUB_REPOSITORY | sed -r 's/^.+\/(.+)$/\/\1\//')
echo PUBLIC_URL=$PUBLIC_URL > .env
- name: Build app
run: |
yarn client build
cp ./packages/frontend/dist/index.html ./packages/frontend/dist/404.html
- name: Build storybook
run: |
yarn client build-storybook
mv ./packages/frontend/storybook-static ./packages/frontend/dist/storybook
- name: Deploy to gh-pages branch
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./packages/frontend/dist