Skip to content

feat: 40

feat: 40 #62

name: "Deploy Storybook"
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build-deploy:
runs-on: ubuntu-latest
env:
ASSETS_PATH: "https://static.datenhub.net/apps/${{ github.event.repository.name }}/${{ github.head_ref || github.ref_name }}/"
defaults:
run:
working-directory: ./components
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Create .env file for production
run: |
touch .env
echo ASSETS_PATH=$ASSETS_PATH >> .env
- run: npm ci
- run: npm run build-storybook
- uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}
- name: "Upload files to GCP"
uses: "google-github-actions/upload-cloud-storage@v2"
with:
path: "./components/storybook-static"
parent: false
destination: "datenhub-net-static/apps/${{ github.event.repository.name }}/${{ github.head_ref || github.ref_name }}/"