Skip to content

v1.0.19 🌈

v1.0.19 🌈 #11

Workflow file for this run

name: Production (GCP)
on:
release:
types: [published]
permissions:
contents: write
jobs:
build:
permissions:
id-token: write
contents: write
pull-requests: write
name: Build and Publish Storybook
runs-on: ubuntu-latest
env:
CONFIG_TYPE: "PRODUCTION"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Nodejs, Install Dependencies, and Build Storybook
uses: actions/setup-node@v4
with:
node-version: "22.12.0"
- run: yarn install --immutable
- run: yarn build-storybook
- name: Validate GCP credentials
shell: bash
run: |
if [ -z "$GCP_PROD_SA_KEY" ]; then
echo "::error::GCP_PROD_SA_KEY environment variable is not set or is empty"
echo "Please ensure the GCP_PROD_SA_KEY secret is configured in your repository"
exit 1
fi
echo "✓ GCP_PROD_SA_KEY is set (length: ${#GCP_PROD_SA_KEY} characters)"
env:
GCP_PROD_SA_KEY: ${{ secrets.GCP_PROD_SA_KEY }}
- name: Authenticate to GCP
uses: google-github-actions/auth@v2
env:
GCP_PROD_SA_KEY: ${{ secrets.GCP_PROD_SA_KEY }}
with:
credentials_json: ${{ secrets.GCP_PROD_SA_KEY }}
project_id: virtualinternshipsinfra
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2
- name: Upload storybook to GCS bucket
run: |
gsutil -m rsync -r -d ./storybook-static gs://prod-vi-storybook/mui-drawer
- name: Invalidate storybook CDN cache
run: |
gcloud compute url-maps invalidate-cdn-cache prod-vi-storybook-url-map \
--path "/mui-drawer/*" \
--global \
--project=virtualinternshipsinfra \
--async