Merge pull request #597 from woowacourse-teams/feat/596-apply-scroll-… #45
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: Client Deploy Storybook | |
on: | |
push: | |
branches: [dev] | |
paths: client/** | |
workflow_dispatch: | |
jobs: | |
deploy: | |
defaults: | |
run: | |
working-directory: client | |
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('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: yarn install --frozen-lockfile | |
- name: Build storybook | |
run: yarn build:storybook | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./client/storybook-static | |
destination_dir: storybook |