Restructure into Wiki, Studio and Python monorepo with scoped CI
python CI and deployment / verify-and-deploy (push) Successful in 7m23s
studio CI and deployment / verify-and-deploy (push) Failing after 5m28s
wiki CI and deployment / verify-and-deploy (push) Failing after 6m13s

This commit is contained in:
2026-10-25 21:13:43 +08:00
parent c898e41672
commit a2330b22e2
152 changed files with 3525 additions and 3287 deletions
-72
View File
@@ -1,72 +0,0 @@
name: PROMPT Docker CI and deployment
on:
push:
branches: [main]
paths:
- '**'
- '!docs/**'
- '!**/*.md'
- 'public/**'
pull_request:
paths:
- '**'
- '!docs/**'
- '!**/*.md'
- 'public/**'
workflow_dispatch:
jobs:
verify-and-deploy:
runs-on: ces-control
timeout-minutes: 45
env:
PROMPT_IMAGE: prompt:${{ gitea.sha }}
PROMPT_TEST_IMAGE: prompt-tests:${{ gitea.sha }}
RELEASE_SHA: ${{ gitea.sha }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Verify release classification policy
run: bash tests/release-mode.sh
- name: Choose full or Web-only release
id: release
run: |
set -eu
mode=full
if [ "${{ gitea.event_name }}" = push ] && [ "${{ gitea.ref }}" = refs/heads/main ]; then
mode=$(bash scripts/release-mode.sh)
if [ "$mode" = web ]; then
image=$(sed -n 's/^PROMPT_IMAGE=//p' /opt/prompt/current/release.env)
if ! docker image inspect "prompt-tests:${image#prompt:}" >/dev/null 2>&1; then mode=full; fi
fi
fi
echo "mode=$mode" >> "$GITHUB_OUTPUT"
echo "Release mode: $mode"
- name: Build and deploy Web using the existing Docker environment
if: steps.release.outputs.mode == 'web'
run: bash scripts/deploy-web.sh "$RELEASE_SHA"
- name: Check preinstalled Docker Engine and Compose
if: steps.release.outputs.mode != 'web'
run: |
set -eu
command -v docker
docker compose version
docker info >/dev/null
- name: Validate the Compose configuration
if: steps.release.outputs.mode != 'web'
run: docker compose --env-file .env.example config --quiet
- name: Type check, unit tests, production build and smoke test inside Docker
if: steps.release.outputs.mode != 'web'
run: docker build --target integration -t "$PROMPT_TEST_IMAGE" .
- name: Build non-root production image with bundled FFmpeg
if: steps.release.outputs.mode != 'web'
run: docker build --target runtime -t "$PROMPT_IMAGE" .
- name: Test the complete isolated Docker stack
if: steps.release.outputs.mode != 'web'
run: bash scripts/integration.sh
- name: Deploy the persistent Docker Compose stack
if: steps.release.outputs.mode != 'web' && gitea.ref == 'refs/heads/main' && (gitea.event_name == 'push' || gitea.event_name == 'workflow_dispatch')
run: bash scripts/deploy.sh "$RELEASE_SHA"
+26
View File
@@ -0,0 +1,26 @@
name: python CI and deployment
on:
push:
branches: [main]
paths:
- 'apps/python/**'
- '.gitea/workflows/python.yml'
pull_request:
paths:
- 'apps/python/**'
- '.gitea/workflows/python.yml'
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 python
run: docker build -f apps/python/Dockerfile -t "prompt-python:${{ gitea.sha }}" .
- name: Release python
if: gitea.ref == 'refs/heads/main' && (gitea.event_name == 'push' || gitea.event_name == 'workflow_dispatch')
run: bash scripts/deploy-python.sh "${{ gitea.sha }}"
+28
View File
@@ -0,0 +1,28 @@
name: studio CI and deployment
on:
push:
branches: [main]
paths:
- 'apps/studio/**'
- '.gitea/workflows/studio.yml'
- 'pnpm-workspace.yaml'
pull_request:
paths:
- 'apps/studio/**'
- '.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 }}"
+43
View File
@@ -0,0 +1,43 @@
name: wiki CI and deployment
on:
push:
branches: [main]
paths:
- 'apps/wiki/**'
- '.gitea/workflows/wiki.yml'
- 'Dockerfile'
- 'compose.yml'
- 'scripts/**'
- 'pnpm-workspace.yaml'
pull_request:
paths:
- 'apps/wiki/**'
- '.gitea/workflows/wiki.yml'
- 'Dockerfile'
- 'compose.yml'
- 'scripts/**'
- '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: Validate configuration
run: docker compose --env-file apps/wiki/.env.example config --quiet
- name: Build and verify Wiki
run: docker build --target integration -t "prompt-tests:${{ gitea.sha }}" .
- name: Build runtime
run: docker build --target runtime -t "prompt:${{ gitea.sha }}" .
- name: Integration stack
env:
PROMPT_IMAGE: prompt:${{ gitea.sha }}
PROMPT_TEST_IMAGE: prompt-tests:${{ gitea.sha }}
run: bash scripts/integration.sh
- name: Deploy Wiki
if: gitea.ref == 'refs/heads/main' && (gitea.event_name == 'push' || gitea.event_name == 'workflow_dispatch')
run: bash scripts/deploy.sh "${{ gitea.sha }}"