Skip to content

build(deps-dev): bump vite from 7.3.0 to 7.3.2 #112

build(deps-dev): bump vite from 7.3.0 to 7.3.2

build(deps-dev): bump vite from 7.3.0 to 7.3.2 #112

name: 'Deploy sophora-components'
on:
workflow_dispatch:
push:
paths:
- 'sophora-components/**'
branches:
- main
pull_request:
paths:
- 'sophora-components/**'
types: [opened, synchronize]
jobs:
build-deploy:
runs-on: ubuntu-latest
env:
BASE_PATH: '/apps/sophora-components/${{ github.head_ref || github.ref_name }}'
ASSETS_PATH: 'https://static.datenhub.net/apps/sophora-components/${{ github.head_ref || github.ref_name }}'
defaults:
run:
working-directory: ./sophora-components
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 24
- name: Create .env file for production
run: |
touch .env
echo BASE_PATH=$BASE_PATH >> .env
echo ASSETS_PATH=$ASSETS_PATH >> .env
- run: npm ci
- run: npm run build
- 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: './sophora-components/build'
parent: false
destination: 'datenhub-net-static/apps/sophora-components/${{ github.head_ref || github.ref_name }}/'