Skip to content

build(deps-dev): bump typescript-eslint from 8.56.1 to 8.60.1 #123

build(deps-dev): bump typescript-eslint from 8.56.1 to 8.60.1

build(deps-dev): bump typescript-eslint from 8.56.1 to 8.60.1 #123

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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
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@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 #v3.0.0
with:
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}
- name: 'Upload files to GCP'
uses: google-github-actions/upload-cloud-storage@6397bd7208e18d13ba2619ee21b9873edc94427a #v3.0.0
with:
path: './sophora-components/build'
parent: false
destination: 'datenhub-net-static/apps/sophora-components/${{ github.head_ref || github.ref_name }}/'