31 lines
877 B
YAML
31 lines
877 B
YAML
name: studio CI and deployment
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'apps/studio/**'
|
|
- 'scripts/deploy-studio.sh'
|
|
- '.gitea/workflows/studio.yml'
|
|
- 'pnpm-workspace.yaml'
|
|
pull_request:
|
|
paths:
|
|
- 'apps/studio/**'
|
|
- 'scripts/deploy-studio.sh'
|
|
- '.gitea/workflows/studio.yml'
|
|
- 'pnpm-workspace.yaml'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
verify-and-deploy:
|
|
runs-on: ces-control
|
|
timeout-minutes: 45
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Build and verify studio
|
|
run: docker build -f apps/studio/Dockerfile -t "prompt-studio:${{ gitea.sha }}" .
|
|
- name: Release studio
|
|
if: gitea.ref == 'refs/heads/main' && (gitea.event_name == 'push' || gitea.event_name == 'workflow_dispatch')
|
|
run: bash scripts/deploy-studio.sh "${{ gitea.sha }}"
|