Skip to content
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools
name: Deploy story to Firebase Hosting on merge
"on":
push:
branches:
- main
jobs:
build_and_preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: setup Node
uses: actions/setup-node@v3
with:
node-version: v18.x
registry-url: "https://registry.npmjs.org"
- uses: actions/cache@v3
id: node_modules_cache_id
env:
cache-name: cache-node-modules
with:
path: "**/node_modules"
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
- if: ${{ steps.node_modules_cache_id.outputs.cache-hit != 'true' }}
name: Install npm packages
run: yarn install
- name: build app
run: yarn run build-storybook
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_BLOG_OJISAN_IO }}"
channelId: live
projectId: blog-ojisan-io
target: storybook