Skip to content

Deploy App to Production #34

Deploy App to Production

Deploy App to Production #34

name: Deploy App to Production
"on":
workflow_dispatch:
inputs:
version:
type: string
description: "A release version to deploy, e.g. v2.0.0"
required: true
default: "v2.0.0"
jobs:
deploy:
name: Deploy
runs-on: matterlabs-firebase-deployer
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Install Firebase CLI and auth
run: |
npm install -g firebase-tools
- name: Download Dist package
uses: dsaltares/fetch-gh-release-asset@master
with:
version: "tags/${{ github.event.inputs.version }}"
file: "dist.zip"
target: "dist.zip"
token: ${{ secrets.GITHUB_TOKEN }}
- name: Unzip Dist package
run: |
unzip dist.zip -d packages/app
- name: Update config
run: |
echo "window[\"##runtimeConfig\"] = { sentryDSN: \"${{ vars.SENTRY_DSN }}\" };" > packages/app/dist/config.js
- name: Download Storybook package
uses: dsaltares/fetch-gh-release-asset@master
with:
version: "tags/${{ github.event.inputs.version }}"
file: "storybook-static.zip"
target: "storybook-static.zip"
token: ${{ secrets.GITHUB_TOKEN }}
- name: Unzip Storybook package
run: |
unzip storybook-static.zip -d packages/app
- name: Deploy
working-directory: ./packages/app
run: |
firebase --project scan-v2 deploy