feat: add manual workflow dispatch support for UI deployment

- Add workflow_dispatch to ci-main.yml for manual full pipeline runs
- Add workflow_dispatch to cd-deploy.yml with component selection
- Update documentation with UI deployment instructions
- Allow backend and web deployment via Forgejo UI Actions tab
This commit is contained in:
Dmitry 2025-11-16 17:10:33 +03:00
parent a62fc1c9e4
commit 6aab887b50
4 changed files with 34 additions and 4 deletions

1
check_deploy_ready.sh Symbolic link
View file

@ -0,0 +1 @@
tools/scripts/check_deploy_ready.sh

View file

@ -21,7 +21,10 @@ Forgejo Actions workflows для автоматической сборки, те
4. **Запустите деплой:**
```bash
# Автоматический деплой
git push origin main
# ИЛИ ручной запуск через UI Forgejo
```
## Workflows
@ -59,12 +62,25 @@ DEPLOY_SSH_PRIVATE_KEY # SSH ключ для доступа к серверу 1
## Ручной запуск
### Backend деплой
### Через UI Forgejo
1. Перейдите в репозиторий на Forgejo
2. Откройте вкладку **Actions**
3. Выберите workflow:
- **"Main CI Pipeline"** - полный цикл (сборка + деплой)
- **"Deploy Applications"** - только деплой (без пересборки)
4. Нажмите **"Run workflow"** (кнопка с плей-иконкой)
5. Выберите компонент для деплоя (для Deploy Applications)
6. Нажмите **"Run workflow"**
### Через командную строку
#### Backend деплой
```bash
../../deploy/backend-build_app.sh
```
### Web app деплой
#### Web app деплой
```bash
../../deploy/web-app/deploy.sh
```

View file

@ -3,10 +3,22 @@ name: Deploy Applications
on:
push:
branches: [ main, master ]
workflow_dispatch:
inputs:
component:
description: 'Component to deploy'
required: false
default: 'all'
type: choice
options:
- all
- backend
- web
- mobile
jobs:
deploy-backend:
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
@ -30,7 +42,7 @@ jobs:
./backend-build_app.sh
deploy-web:
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:

View file

@ -5,6 +5,7 @@ on:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
workflow_dispatch:
jobs:
code-quality: